Learn R Programming

parameters (version 0.1.0)

model_parameters.merMod: Mixed Model Parameters

Description

Parameters of mixed models.

Usage

# S3 method for merMod
model_parameters(model, ci = 0.95,
  standardize = "refit", standardize_robust = FALSE,
  bootstrap = FALSE, p_method = "wald", ci_method = "wald",
  iterations = 1000, ...)

Arguments

model

Frequentist regression object.

ci

Confidence Interval (CI) level. Default to 0.95 (95%).

standardize

Add standardized parameters. Can be FALSE or a character indicating the standardization method (see parameters_standardize), such as "refit", "2sd", "smart" or "classic". The two formers are based on model refitting using a standardized version of data. It is the most accurate, altough computationnaly heavy (as it must re-fit a second model). The "smart" and "classic" are post-hoc methods, fast, but inaccurate (especially if the model includes interactions).

standardize_robust

Robust standardization. See parameters_standardize.

bootstrap

Should estimates be based on bootsrapped model? If TRUE, then arguments of Bayesian regressions apply.

p_method

Method for computing p values. See p_value.

ci_method

Method for computing confidence intervals (CI). See ci.

iterations

The number of bootstrap replicates. This only apply in the case of bootsrapped frequentist models.

...

Arguments passed to or from other methods (e.g., to standardize).

Value

A data.frame of indices related to the model's parameters.

Examples

Run this code
# NOT RUN {
library(parameters)
library(lme4)

model <- lme4::lmer(mpg ~ wt + (1 | gear), data = mtcars)
model_parameters(model, standardize = "refit")

model <- lme4::glmer(vs ~ wt + (1 | gear), data = mtcars, family = "binomial")
model_parameters(model)
# }
# NOT RUN {
model <- lme4::lmer(mpg ~ wt + (1 | gear), data = mtcars)
model_parameters(model, standardize = "smart", bootstrap = TRUE, iterations = 50)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab