insight (version 0.11.0)

find_parameters: Find names of model parameters

Description

Returns the names of model parameters, like they typically appear in the summary() output. For Bayesian models, the parameter names equal the column names of the posterior samples after coercion from as.data.frame().

Usage

find_parameters(x, ...)

# S3 method for betamfx find_parameters( x, component = c("all", "conditional", "precision", "marginal"), flatten = FALSE, ... )

# S3 method for logitmfx find_parameters( x, component = c("all", "conditional", "marginal"), flatten = FALSE, ... )

# S3 method for gam find_parameters( x, component = c("all", "conditional", "smooth_terms"), flatten = FALSE, ... )

# S3 method for merMod find_parameters(x, effects = c("all", "fixed", "random"), flatten = FALSE, ...)

# S3 method for zeroinfl find_parameters( x, component = c("all", "conditional", "zi", "zero_inflated"), flatten = FALSE, ... )

# S3 method for BGGM find_parameters( x, component = c("correlation", "conditional", "intercept", "all"), flatten = FALSE, ... )

# S3 method for BFBayesFactor find_parameters( x, effects = c("all", "fixed", "random"), component = c("all", "extra"), flatten = FALSE, ... )

# S3 method for brmsfit find_parameters( x, effects = c("all", "fixed", "random"), component = c("all", "conditional", "zi", "zero_inflated", "dispersion", "simplex", "sigma", "smooth_terms"), flatten = FALSE, parameters = NULL, ... )

# S3 method for bayesx find_parameters( x, component = c("all", "conditional", "smooth_terms"), flatten = FALSE, parameters = NULL, ... )

# S3 method for stanreg find_parameters( x, effects = c("all", "fixed", "random"), component = c("all", "conditional", "smooth_terms"), flatten = FALSE, parameters = NULL, ... )

# S3 method for sim.merMod find_parameters( x, effects = c("all", "fixed", "random"), flatten = FALSE, parameters = NULL, ... )

# S3 method for averaging find_parameters(x, component = c("conditional", "full"), flatten = FALSE, ...)

Arguments

x

A fitted model.

...

Currently not used.

component

Should all parameters, parameters for the conditional model, the zero-inflated part of the model, the dispersion term, the instrumental variables or marginal effects be returned? Applies to models with zero-inflated and/or dispersion formula, or to models with instrumental variables (so called fixed-effects regressions), or models with marginal effects from mfx. May be abbreviated. Note that the conditional component is also called count or mean component, depending on the model.

flatten

Logical, if TRUE, the values are returned as character vector, not as list. Duplicated values are removed.

effects

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

parameters

Regular expression pattern that describes the parameters that should be returned.

Value

A list of parameter names. For simple models, only one list-element, conditional, is returned. For more complex models, the returned list may have following elements:

  • conditional, the "fixed effects" part from the model

  • random, the "random effects" part from the model

  • zero_inflated, the "fixed effects" part from the zero-inflation component of the model

  • zero_inflated_random, the "random effects" part from the zero-inflation component of the model

  • dispersion, the dispersion parameters

  • simplex, simplex parameters of monotonic effects (brms only)

  • smooth_terms, the smooth parameters

  • marginal, the marginal effects (for models from mfx)

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. Not all model classes that support these arguments are listed here in the 'Usage' section.

Examples

Run this code
# NOT RUN {
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
find_parameters(m)
# }

Run the code above in your browser using DataLab