Learn R Programming

marginaleffects (version 0.1.0)

predictions: Adjusted Predictions

Description

Compute model-adjusted predictions (fitted values) for a "grid" of regressor values.

Usage

predictions(model, variables = NULL, newdata = NULL, conf.level = 0.95, ...)

Arguments

model

Model object

variables

Character vector. Compute Adjusted Predictions for combinations of each of these variables. Factor levels are considered at each of their levels. Numeric variables variables are considered at Tukey's Five-Number Summaries. NULL uses the original data used to fit the model.

newdata

A dataset over which to compute adjusted predictions. NULL uses the original data used to fit the model.

conf.level

The confidence level to use for the confidence interval. No interval is computed if conf.int=NULL. Must be strictly greater than 0 and less than 1. Defaults to 0.95, which corresponds to a 95 percent confidence interval.

...

Additional arguments are pushed forward to predict().

Value

A data.frame with a predicted column with predictions.