knitr::opts_chunk$set( collapse = TRUE, dpi = 300, fig.path = "man/figures/", comment = "#>", warning = FALSE, message = FALSE, out.width = "100%" ) set.seed(333) library(parameters)
Describe and understand your model's parameters!
parameters' primary goal is to provide utilities for processing the parameters of various statistical models (see here for a list of supported models). Beyond computing p-values, CIs, Bayesian indices and other measures for a wide variety of models, this package implements features like bootstrapping of parameters and models, feature reduction (feature extraction and variable selection), or tools for data reduction like functions to perform cluster, factor or principal component analysis.
Another important goal of the parameters package is to facilitate and streamline the process of reporting results of statistical models, which includes the easy and intuitive calculation of standardized estimates or robust standard errors and p-values. parameters therefor offers a simple and unified syntax to process a large variety of (model) objects from many different packages.
Type | Source | Command
---|---|---
Release | CRAN | install.packages("parameters")
Development | r - universe | install.packages("parameters", repos = "https://easystats.r-universe.dev")
Development | GitHub | remotes::install_github("easystats/parameters")
Tip
Instead of
library(parameters)
, uselibrary(easystats)
. This will make all features of the easystats-ecosystem available.To stay updated, use
easystats::install_latest()
.
Click on the buttons above to access the package documentation and the easystats blog, and check-out these vignettes:
In case you want to file an issue or contribute in another way to the package, please follow this guide. For questions about the functionality, you may either contact us via email or also file an issue.
knitr::include_graphics("man/figures/figure1.png")
The model_parameters()
function (that can be accessed via the parameters()
shortcut) allows you to extract the parameters and their characteristics from various models in a consistent way. It can be considered as a lightweight alternative to broom::tidy()
, with some notable differences:
standardize_names()
).model <- lm(Sepal.Width ~ Petal.Length * Species + Petal.Width, data = iris) # regular model parameters model_parameters(model) # standardized parameters model_parameters(model, standardize = "refit") # heteroscedasticity-consitent SE and CI model_parameters(model, vcov = "HC3")
library(lme4) model <- lmer(Sepal.Width ~ Petal.Length + (1 | Species), data = iris) # model parameters with CI, df and p-values based on Wald approximation model_parameters(model) # model parameters with CI, df and p-values based on Kenward-Roger approximation model_parameters(model, ci_method = "kenward", effects = "fixed")
Besides many types of regression models and packages, it also works for other types of models, such as structural models (EFA, CFA, SEM...).
library(psych) model <- psych::fa(attitude, nfactors = 3) model_parameters(model)
knitr::include_graphics("man/figures/figure2.png")
select_parameters()
can help you quickly select and retain the most relevant predictors using methods tailored for the model type.
lm(disp ~ ., data = mtcars) |> select_parameters() |> model_parameters()
In order to cite this package, please use the following command:
citation("parameters")
Please note that the parameters project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.