Skip to content

Commit

Permalink
coda rises from the dead
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Sep 25, 2020
1 parent 438148b commit 3ded79d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Description: Convert fitted objects from various R mixed-model packages
provides a one-row summary of model-level statistics.
Imports:
broom,
coda,
dplyr,
methods,
nlme,
Expand All @@ -40,7 +41,6 @@ Imports:
tidyr
Suggests:
brms,
coda,
dotwhisker,
knitr,
testthat,
Expand Down
2 changes: 0 additions & 2 deletions R/MCMCglmm_prediction.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@
predict2.MCMCglmm <- function(object, X, Z, use = c("all", "mean"),
type = c("lp", "response"), ...) {

assert_dependency("coda")

use <- match.arg(use)
type <- match.arg(type)

Expand Down
2 changes: 0 additions & 2 deletions R/brms_tidiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ tidy.brmsfit <- function(x, parameters = NA,
out$std.error <- apply(samples, 2, stdfun)
if (conf.int) {

assert_dependency("coda")

stopifnot(length(conf.level) == 1L)
probs <- c((1 - conf.level) / 2, 1 - (1 - conf.level) / 2)
if (conf.method == "HPDinterval") {
Expand Down
6 changes: 0 additions & 6 deletions R/mcmc_tidiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ tidyMCMC <- function(x,
index = FALSE,
...) {

assert_dependency("coda")

conf.method <- match.arg(conf.method)

stan <- inherits(x, "stanfit")
Expand Down Expand Up @@ -156,8 +154,6 @@ tidy.rjags <- function(x,
conf.method = "quantile",
...) {

assert_dependency("coda")

tidyMCMC(coda::as.mcmc(x$BUGS),
robust = robust,
conf.int = conf.int,
Expand All @@ -183,8 +179,6 @@ tidy.mcmc.list <- tidyMCMC
## copied from emdbook ...
as.mcmc.bugs <- function (x) {

assert_dependency("coda")

if (x$n.chains > 1) {
z <- list()
for (i in 1:x$n.chains) {
Expand Down
2 changes: 0 additions & 2 deletions R/rstanarm_tidiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ tidy.stanreg <- function(x,

if (conf.int) {

assert_dependency("coda")

cifix <- switch(conf.method,
HPDinterval= {
m <- as.matrix(x$stanfit)
Expand Down

0 comments on commit 3ded79d

Please sign in to comment.