Returns the coefficients from a model.
# S3 method for glmm
get_parameters(x, effects = c("all", "fixed", "random"), ...)# S3 method for coxme
get_parameters(x, effects = c("fixed", "random"), ...)
# S3 method for merMod
get_parameters(x, effects = c("fixed", "random"), ...)
# S3 method for glmmTMB
get_parameters(
x,
effects = c("fixed", "random"),
component = c("all", "conditional", "zi", "zero_inflated", "dispersion"),
...
)
# S3 method for glimML
get_parameters(x, effects = c("fixed", "random", "all"), ...)
A fitted model.
Should parameters for fixed effects, random effects or both be returned? Only applies to mixed models. May be abbreviated.
Currently not used.
Which type of parameters to return, such as parameters for the
conditional model, the zero-inflated part of the model or the dispersion
term? Applies to models with zero-inflated and/or dispersion formula. Note
that the conditional component is also called count or mean
component, depending on the model. There are three convenient shortcuts:
component = "all"
returns all possible parameters.
If component = "location"
, location parameters such as conditional
or zero_inflated
are returned (everything that are fixed or random
effects - depending on the effects
argument - but no auxiliary
parameters). For component = "distributional"
(or "auxiliary"
),
components like sigma
or dispersion
(and other auxiliary
parameters) are returned.
If effects = "fixed"
, a data frame with two columns: the
parameter names and the related point estimates. If effects =
"random"
, a list of data frames with the random effects (as returned by
ranef()
), unless the random effects have the same simplified
structure as fixed effects (e.g. for models from MCMCglmm).
In most cases when models either return different "effects" (fixed,
random) or "components" (conditional, zero-inflated, ...), the arguments
effects
and component
can be used.
# NOT RUN {
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
get_parameters(m)
# }
Run the code above in your browser using DataLab