prediction: Tidy, Type-Safe 'prediction()' Methods

A one-function package containing prediction(), a type-safe alternative to predict() that always returns a data frame. The summary() method provides a data frame with average predictions, possibly over counterfactual versions of the data (à la the margins command in 'Stata'). Marginal effect estimation is provided by the related package, 'margins' <>. The package currently supports common model types (e.g., lm, glm) from the 'stats' package, as well as numerous other model classes from other add-on packages. See the README file or main package documentation page for a complete listing.

Version: 0.3.18
Depends: R (≥ 3.5.0)
Imports: utils, stats, data.table
Suggests: datasets, methods, testthat
Enhances: AER, aod, betareg, biglm, brglm, caret, crch, e1071, earth, ff, gam (≥ 1.15), gee, glmnet, glmx, kernlab, lme4, MASS, mclogit, mda, mlogit, MNP, nlme, nnet, ordinal, plm, pscl, quantreg, rpart, sampleSelection, speedglm, survey (≥ 3.31-5), survival, truncreg, VGAM
Published: 2024-06-11
DOI: 10.32614/CRAN.package.prediction
Author: Thomas J. Leeper ORCID iD [aut], Carl Ganz [ctb], Vincent Arel-Bundock ORCID iD [ctb], Ben Bolker ORCID iD [ctb, cre]
Maintainer: Ben Bolker <bolker at>
License: MIT + file LICENSE
NeedsCompilation: no
Materials: README NEWS
CRAN checks: prediction results


Reference manual: prediction.pdf


Package source: prediction_0.3.18.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): prediction_0.3.18.tgz, r-oldrel (arm64): prediction_0.3.18.tgz, r-release (x86_64): prediction_0.3.18.tgz, r-oldrel (x86_64): prediction_0.3.18.tgz
Old sources: prediction archive

Reverse dependencies:

Reverse imports: margins, mhurdle
Reverse suggests: estimatr


Please use the canonical form to link to this page.