R/methods_cplm.R
, R/methods_glmmTMB.R
, R/methods_lme4.R
, and 2 more
model_parameters.merMod.Rd
Parameters from (linear) mixed models.
# S3 method for cpglmm
model_parameters(
model,
ci = 0.95,
bootstrap = FALSE,
iterations = 1000,
standardize = NULL,
effects = "all",
group_level = FALSE,
exponentiate = FALSE,
df_method = NULL,
p_adjust = NULL,
verbose = TRUE,
...
)
# S3 method for glmmTMB
model_parameters(
model,
ci = 0.95,
bootstrap = FALSE,
iterations = 1000,
effects = "all",
component = "all",
group_level = FALSE,
standardize = NULL,
exponentiate = FALSE,
df_method = NULL,
p_adjust = NULL,
wb_component = TRUE,
summary = FALSE,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
# S3 method for merMod
model_parameters(
model,
ci = 0.95,
bootstrap = FALSE,
df_method = NULL,
iterations = 1000,
standardize = NULL,
effects = "all",
group_level = FALSE,
exponentiate = FALSE,
robust = FALSE,
p_adjust = NULL,
wb_component = TRUE,
summary = FALSE,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
# S3 method for mixor
model_parameters(
model,
ci = 0.95,
effects = "all",
bootstrap = FALSE,
iterations = 1000,
standardize = NULL,
exponentiate = FALSE,
verbose = TRUE,
...
)
# S3 method for clmm
model_parameters(
model,
ci = 0.95,
bootstrap = FALSE,
iterations = 1000,
standardize = NULL,
effects = "all",
group_level = FALSE,
exponentiate = FALSE,
df_method = NULL,
p_adjust = NULL,
verbose = TRUE,
...
)
model  A mixed model. 

ci  Confidence Interval (CI) level. Default to 
bootstrap  Should estimates be based on bootstrapped model? If

iterations  The number of draws to simulate/bootstrap. 
standardize  The method used for standardizing the parameters. Can be

effects  Should parameters for fixed effects ( 
group_level  Logical, for multilevel models (i.e. models with random
effects) and when 
exponentiate  Logical, indicating whether or not to exponentiate the
the coefficients (and related confidence intervals). This is typical for
logistic regression, or more generally speaking, for models with log
or logit links. Note: Deltamethod standard errors are also
computed (by multiplying the standard errors by the transformed
coefficients). This is to mimic behaviour of other software packages, such
as Stata, but these standard errors poorly estimate uncertainty for the
transformed coefficient. The transformed confidence interval more clearly
captures this uncertainty. For 
df_method  Method for computing degrees of freedom for p values,
standard errors and confidence intervals (CI). By default ( 
p_adjust  Character vector, if not 
verbose  Toggle warnings and messages. 
...  Arguments passed to or from other methods. 
component  Should all parameters, parameters for the conditional model,
or for the zeroinflated part of the model be returned? Applies to models
with zeroinflated component. 
wb_component  Logical, if 
summary  Logical, if 
keep  Character containing a regular expression pattern that
describes the parameters that should be included in the returned data frame
(for 
drop  Character containing a regular expression pattern that
describes the parameters that should be included in the returned data frame
(for 
parameters  Deprecated, alias for 
robust  Logical, if 
A data frame of indices related to the model's parameters.
There is also a plot()
method implemented in the seepackage.
When df_method = "profile"
and effects
is either "random"
or "all"
,
profiled confidence intervals are computed for the random effects. For all
other options of df_method
, confidence intervals for random effects will
be missing.
insight::standardize_names()
to
rename columns into a consistent, standardized naming scheme.
library(parameters)
if (require("lme4")) {
data(mtcars)
model < lmer(mpg ~ wt + (1  gear), data = mtcars)
model_parameters(model)
}
#> Loading required package: lme4
#>
#> Attaching package: ‘lme4’
#> The following object is masked from ‘package:nlme’:
#>
#> lmList
#> # Fixed Effects
#>
#> Parameter  Coefficient  SE  95% CI  t(28)  p
#> 
#> (Intercept)  36.19  2.19  [31.70, 40.68]  16.52  < .001
#> wt  5.05  0.64  [6.36, 3.73]  7.89  < .001
#>
#> # Random Effects
#>
#> Parameter  Coefficient
#> 
#> SD (Intercept: gear)  1.26
#> SD (Residual)  2.91
#>
#> Using residual degrees of freedom for CI/pvalues.
# \donttest{
if (require("glmmTMB")) {
data(Salamanders)
model < glmmTMB(
count ~ spp + mined + (1  site),
ziformula = ~mined,
family = poisson(),
data = Salamanders
)
model_parameters(model, effects = "all")
}
#> # Fixed Effects (Count Model)
#>
#> Parameter  LogMean  SE  95% CI  z  p
#> 
#> (Intercept)  0.36  0.28  [0.90, 0.18]  1.30  0.194
#> spp [PR]  1.27  0.24  [1.74, 0.80]  5.27  < .001
#> spp [DM]  0.27  0.14  [ 0.00, 0.54]  1.95  0.051
#> spp [ECA]  0.57  0.21  [0.97, 0.16]  2.75  0.006
#> spp [ECL]  0.67  0.13  [ 0.41, 0.92]  5.20  < .001
#> spp [DESL]  0.63  0.13  [ 0.38, 0.87]  4.96  < .001
#> spp [DF]  0.12  0.15  [0.17, 0.40]  0.78  0.435
#> mined [no]  1.27  0.27  [ 0.74, 1.80]  4.72  < .001
#>
#> # Fixed Effects (ZeroInflated Model)
#>
#> Parameter  LogOdds  SE  95% CI  z  p
#> 
#> (Intercept)  0.79  0.27  [ 0.26, 1.32]  2.90  0.004
#> mined [no]  1.84  0.31  [2.46, 1.23]  5.87  < .001
#>
#> # Random Effects Variances
#>
#> Parameter  Coefficient
#> 
#> SD (Intercept: site)  0.33
#> SD (Residual)  1.00
#>
#> # Random Effects (ZeroInflated Model)
#>
#> Parameter  Coefficient
#> 
#> SD (Residual)  1.00
if (require("lme4")) {
model < lmer(mpg ~ wt + (1  gear), data = mtcars)
model_parameters(model, bootstrap = TRUE, iterations = 50)
}
#> Warning: Bootstrapping only returns fixed effects of the mixed model.
#> # Fixed Effects
#>
#> Parameter  Coefficient  95% CI  p
#> 
#> (Intercept)  36.20  [32.15, 42.80]  0.020
#> wt  5.05  [6.68, 3.82]  0.020
#>
#> Using residual degrees of freedom for CI/pvalues.
# }