Skip to content

Commit ad962ed

Browse files
committed
docs
1 parent 2dd09fd commit ad962ed

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

R/methods_glmmTMB.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,6 @@ ci.glmmTMB <- function(x,
469469

470470
# standard_error -----
471471

472-
473-
#' @rdname standard_error
474472
#' @export
475473
standard_error.glmmTMB <- function(model,
476474
effects = "fixed",
@@ -481,7 +479,10 @@ standard_error.glmmTMB <- function(model,
481479
component,
482480
c("all", "conditional", "zi", "zero_inflated", "dispersion")
483481
)
484-
effects <- insight::validate_argument(effects, c("fixed", "random"))
482+
effects <- insight::validate_argument(
483+
effects,
484+
c("fixed", "random")
485+
)
485486

486487
dot_args <- .check_dots(
487488
dots = list(...),
@@ -492,12 +493,14 @@ standard_error.glmmTMB <- function(model,
492493
)
493494

494495
if (effects == "random") {
495-
if (!requireNamespace("TMB", quietly = TRUE) && !requireNamespace("glmmTMB", quietly = TRUE)) {
496+
if (!all(insight::check_if_installed(c("TMB", "glmmTMB"), quietly = TRUE))) {
496497
return(NULL)
497498
}
499+
498500
s1 <- TMB::sdreport(model$obj, getJointPrecision = TRUE)
499501
s2 <- sqrt(s1$diag.cov.random)
500502
rand.ef <- glmmTMB::ranef(model)[[1]]
503+
501504
rand.se <- lapply(rand.ef, function(.x) {
502505
cnt <- nrow(.x) * ncol(.x)
503506
s3 <- s2[1:cnt]

man/standard_error.Rd

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)