Skip to content

Commit

Permalink
merge/cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bbolker committed Apr 15, 2024
1 parent 7a7da7b commit b076753
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 0 additions & 2 deletions R/glmm_tidiers.R
Expand Up @@ -2,9 +2,7 @@
##' @importFrom stats vcov
##' @export
tidy.glmm <- function(x, effects = "fixed", ...) {

check_dots(...)

estimate <- std.error <- statistic <- p.value <- NULL ## avoid check warnings for NSE
fix_nm <- names(coef(x))
ran_nm <- x$varcomps.names
Expand Down
12 changes: 12 additions & 0 deletions man/augment.clmm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tests/testthat/test-rstanarm.R
Expand Up @@ -4,7 +4,7 @@ stopifnot(require("testthat"), require("broom.mixed"), require("broom"))
if (suppressPackageStartupMessages(require(rstanarm, quietly = TRUE))) {
load(system.file("extdata", "rstanarm_example.rda", package = "broom.mixed"))
## fit <- stan_glmer(mpg ~ wt + (1|cyl) + (1+wt|gear), data = mtcars,
## iter = 200, chains = 2)
## iter = 200, chains = 2)

context("rstanarm tidiers")
test_that("tidy works on rstanarm fits", {
Expand All @@ -27,6 +27,7 @@ if (suppressPackageStartupMessages(require(rstanarm, quietly = TRUE))) {
td3 <- tidy(fit, conf.int = TRUE, conf.level = 0.95)
nms <- c("level", "group", "term", "estimate", "std.error", "conf.low", "conf.high")
expect_equal(colnames(td2), nms)
## FIXME: why NA values in std.error/conf.low/conf.high here?
expect_true(all(is.na(td3$conf.low) | td3$conf.low < td1$conf.low))
expect_true(all(is.na(td3$conf.high) | td3$conf.high > td1$conf.high))
})
Expand Down

0 comments on commit b076753

Please sign in to comment.