Learn R Programming

insight (version 0.19.11)

get_parameters.glmm: Get model parameters from mixed models

Description

Returns the coefficients from a model.

Usage

# 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 nlmerMod get_parameters( x, effects = c("fixed", "random"), component = c("all", "conditional", "nonlinear"), ... )

# 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"), ...)

Value

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).

Arguments

x

A fitted model.

effects

Should parameters for fixed effects, random effects or both be returned? Only applies to mixed models. May be abbreviated.

...

Currently not used.

component

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.

Details

In most cases when models either return different "effects" (fixed, random) or "components" (conditional, zero-inflated, ...), the arguments effects and component can be used.

Examples

Run this code
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
get_parameters(m)

Run the code above in your browser using DataLab