Compute confidence intervals (CI) for frequentist models.
# S3 method for merMod
ci(
x,
ci = 0.95,
method = c("wald", "ml1", "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 mixor
ci(x, ci = 0.95, effects = c("all", "fixed", "random"), ...)
# S3 method for glmmTMB
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated"),
...
)
# S3 method for zeroinfl
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated"),
...
)
# S3 method for hurdle
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated"),
...
)
# S3 method for MixMod
ci(
x,
ci = 0.95,
component = c("all", "conditional", "zi", "zero_inflated"),
...
)
ci_robust(
model,
ci = 0.95,
vcov_estimation = "HC",
vcov_type = c("HC3", "const", "HC", "HC0", "HC1", "HC2", "HC4", "HC4m", "HC5", "CR0",
"CR1", "CR1p", "CR1S", "CR2", "CR3"),
vcov_args = NULL,
...
)
A statistical model.
Confidence Interval (CI) level. Default to 0.95 (95%).
For mixed models of class merMod
, can be "wald"
(default), "ml1"
, "satterthwaite"
, "kenward"
or "boot"
(see also p_value_kenward
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.
Statistical model (no Bayesian models).
Character vector, specifying the estimation type for the
robust covariance matrix estimation (see vcovHC
for
details).
List of named vectors, used as additional arguments that
are passed down to the sandwich-function specified in vcov_estimation
.
A data frame containing the CI bounds.
# NOT RUN {
library(parameters)
library(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