marginaleffects0.25.0 package

Predictions, Comparisons, Slopes, Marginal Means, and Hypothesis Tests

comparisons

Comparisons Between Predictions Made With Different Regressor Values

complete_levels

Create a data.frame with all factor or character levels

datagrid

Data grids

expect_margins

tinytest helper

expect_predictions

tinytest helper

expect_slopes

tinytest helper

get_coef

Get a named vector of coefficients from a model object

get_dataset

Download and Read Datasets from marginaleffects or Rdatasets

get_draws

Extract Posterior Draws or Bootstrap Resamples from marginaleffects ...

get_group_names

Get levels of the outcome variable in grouped or multivariate models

get_model_matrix

Get a named model matrix

get_predict

Get predicted values from a model object (internal function)

get_varcov_args

Take a summary() style vcov argument and convert it to `insight::g...

get_vcov

Get a named variance-covariance matrix from a model object

hypotheses

(Non-)Linear Tests for Null Hypotheses, Joint Hypotheses, Equivalence,...

inferences

(EXPERIMENTAL) Bootstrap, Conformal, and Simulation-Based Inference

knit_print.marginaleffects

Print a marginaleffects object in knitr

plot_comparisons

Plot Conditional or Marginal Comparisons

plot_predictions

Plot Conditional or Marginal Predictions

plot_slopes

Plot Conditional or Marginal Slopes

posterior_draws

alias to get_draws() keep forever for backward compatibility with JS...

predictions

Predictions

print.marginaleffects

Print marginaleffects objects

reexports

Objects exported from other packages

sanitize_model_specific

Method to raise model-specific warnings and errors

set_coef

Internal function to set coefficients

slopes

Slopes (aka Partial derivatives, Marginal Effects, or Trends)

Compute and plot predictions, slopes, marginal means, and comparisons (contrasts, risk ratios, odds, etc.) for over 100 classes of statistical and machine learning models in R. Conduct linear and non-linear hypothesis tests, or equivalence tests. Calculate uncertainty estimates using the delta method, bootstrapping, or simulation-based inference. Details can be found in Arel-Bundock, Greifer, and Heiss (2024) <doi:10.18637/jss.v111.i09>.

  • Maintainer: Vincent Arel-Bundock
  • License: GPL (>= 3)
  • Last published: 2025-02-01