Compute confidence intervals (CI) for frequentist models.
# S3 method for merMod
ci(
x,
ci = 0.95,
method = c("wald", "ml1", "betwithin", "satterthwaite", "kenward", "boot"),
...
)# S3 method for default
ci(x, ci = 0.95, method = NULL, ...)
# S3 method for glm
ci(x, ci = 0.95, method = c("profile", "wald", "robust"), ...)
# S3 method for polr
ci(x, ci = 0.95, method = c("profile", "wald", "robust"), ...)
# S3 method for mixor
ci(x, ci = 0.95, effects = c("all", "fixed", "random"), ...)
# S3 method for DirichletRegModel
ci(x, ci = 0.95, component = c("all", "conditional", "precision"), ...)
# S3 method for glmmTMB
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated", "dispersion"),
method = c("wald", "ml1", "betwithin", "robust"),
...
)
# S3 method for zeroinfl
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated", "dispersion"),
method = c("wald", "ml1", "betwithin", "robust"),
...
)
# S3 method for hurdle
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated", "dispersion"),
method = c("wald", "ml1", "betwithin", "robust"),
...
)
# S3 method for MixMod
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated"),
...
)
# S3 method for poissonmfx
ci(
x,
ci = 0.95,
component = c("all", "conditional", "marginal"),
method = NULL,
...
)
# S3 method for betamfx
ci(
x,
ci = 0.95,
component = c("all", "conditional", "precision", "marginal"),
method = NULL,
...
)
# S3 method for betareg
ci(x, ci = 0.95, component = c("all", "conditional", "precision"), ...)
# S3 method for clm2
ci(x, ci = 0.95, component = c("all", "conditional", "scale"), ...)
# S3 method for lme
ci(x, ci = 0.95, method = c("wald", "betwithin", "ml1", "satterthwaite"), ...)
A statistical model.
Confidence Interval (CI) level. Default to 0.95 (95%).
For mixed models, can be "wald"
(default), "ml1"
or "betwithin"
. For linear mixed model, can also be "satterthwaite"
, "kenward"
or "boot"
and lme4::confint.merMod
). For (generalized) linear models, can be "robust"
to compute confidence intervals based on robust standard errors, and for generalized linear models, may also be "profile"
(default) or "wald"
.
Arguments passed down to standard_error_robust()
when confidence intervals or p-values based on robust standard errors should be computed.
Should standard errors for fixed effects or random effects be returned? Only applies to mixed models. May be abbreviated. When standard errors for random effects are requested, for each grouping factor a list of standard errors (per group level) for random intercepts and slopes is returned.
Should all parameters, parameters for the conditional model,
or for the zero-inflated part of the model be returned? Applies to models
with zero-inflated component. component
may be one of "conditional"
,
"zi"
, "zero-inflated"
or "all"
(default). May be abbreviated.
A data frame containing the CI bounds.
# NOT RUN {
library(parameters)
if (require("glmmTMB")) {
model <- glmmTMB(
count ~ spp + mined + (1 | site),
ziformula = ~mined,
family = poisson(),
data = Salamanders
)
ci(model)
ci(model, component = "zi")
}
# }
Run the code above in your browser using DataLab