Learn R Programming

parameters (version 0.2.0)

model_parameters.lm: Parameters of (General) Linear Models

Description

Extract and compute indices and measures to describe parameters of (general) linear models (GLMs).

Usage

# S3 method for lm
model_parameters(model, ci = 0.95, standardize = FALSE,
  standardize_robust = FALSE, bootstrap = FALSE, iterations = 1000,
  ...)

# S3 method for polr model_parameters(model, ci = 0.95, bootstrap = FALSE, iterations = 1000, ...)

Arguments

model

Model 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 former are based on model refitting using a standardized version of data. It is the most accurate, although computationally 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 bootstrapped model? If TRUE, then arguments of Bayesian regressions apply (see also parameters_bootstrap()).

iterations

The number of bootstrap replicates. This only apply in the case of bootstrapped 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.

See Also

standardize_names() to rename columns into a consistent, standardized naming scheme.

Examples

Run this code
# NOT RUN {
library(parameters)
model <- lm(mpg ~ wt + cyl, data = mtcars)

model_parameters(model, standardize = "refit")
model_parameters(model, bootstrap = TRUE)

model <- glm(vs ~ wt + cyl, data = mtcars, family = "binomial")
model_parameters(model)
# }

Run the code above in your browser using DataLab