Package: projpred 2.8.0

Frank Weber

projpred: Projection Predictive Feature Selection

Performs projection predictive feature selection for generalized linear models (Piironen, Paasiniemi, and Vehtari, 2020, <doi:10.1214/20-EJS1711>) with or without multilevel or additive terms (Catalina, Bürkner, and Vehtari, 2022, <https://proceedings.mlr.press/v151/catalina22a.html>), for some ordinal and nominal regression models (Weber, Glass, and Vehtari, 2023, <arxiv:2301.01660>), and for many other regression models (using the latent projection by Catalina, Bürkner, and Vehtari, 2021, <arxiv:2109.04702>, which can also be applied to most of the former models). The package is compatible with the 'rstanarm' and 'brms' packages, but other reference models can also be used. See the vignettes and the documentation for more information and examples.

Authors:Juho Piironen [aut], Markus Paasiniemi [aut], Alejandro Catalina [aut], Frank Weber [cre, aut], Aki Vehtari [aut], Jonah Gabry [ctb], Marco Colombo [ctb], Paul-Christian Bürkner [ctb], Hamada S. Badr [ctb], Brian Sullivan [ctb], Sölvi Rögnvaldsson [ctb], The LME4 Authors [cph], Yann McLatchie [ctb], Juho Timonen [ctb]

projpred_2.8.0.tar.gz
projpred_2.8.0.tar.gz(r-4.5-noble)projpred_2.8.0.tar.gz(r-4.4-noble)
projpred_2.8.0.tgz(r-4.4-emscripten)projpred_2.8.0.tgz(r-4.3-emscripten)
projpred.pdf |projpred.html
projpred/json (API)
NEWS

# Install 'projpred' in R:
install.packages('projpred', repos = 'https://cloud.r-project.org')

Bug tracker:https://github.com/stan-dev/projpred/issues44 issues

Pkgdown site:https://mc-stan.org

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

openblascpp

3.92 score 2.1k downloads 2 mentions 26 exports 62 dependencies

Last updated 1 years agofrom:157774b9ad. Checks:3 OK. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKMar 09 2025
R-4.5-linux-x86_64OKMar 09 2025
R-4.4-linux-x86_64OKMar 09 2025

Exports:augdat_ilink_binomaugdat_link_binombreak_up_matrix_termcl_aggcv_foldscv_idscv_proportionscv_varselcvfoldsdo_callextend_familyforce_search_termsget_refmodelinit_refmodelperformancespredictor_termsproj_linpredproj_predictprojectrankingrun_cvfunsolution_termsStudent_tsuggest_sizevarsely_wobs_offs

Dependencies:abindbackportsbootcheckmateclicolorspacedata.tabledescdistributionalfansifarvergamm4genericsggplot2gluegtablegtoolsisobandjsonlitelabelinglatticelifecyclelme4loomagrittrMASSMatrixmatrixStatsmclogitmemiscmgcvminqamunsellmvtnormnlmenloptrnnetnumDerivordinalpillarpkgconfigposteriorR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRcppParallelRdpackreformulasrlangrstantoolsscalestensorAtibbleucminfutf8vctrsviridisLitewithryaml

Latent projection predictive feature selection

Rendered fromlatent.Rmdusingknitr::rmarkdownon Mar 09 2025.

Last update: 2023-12-15
Started: 2023-02-12

projpred: Projection predictive feature selection

Rendered fromprojpred.Rmdusingknitr::rmarkdownon Mar 09 2025.

Last update: 2023-12-15
Started: 2022-04-01

Citation

To cite the 'projpred' R package:

Piironen J, Paasiniemi M, Catalina A, Weber F, Vehtari A (2023). “projpred: Projection Predictive Feature Selection.” R package version 2.8.0, https://mc-stan.org/projpred/.

To cite the 'projpred' comparison paper:

Piironen J, Vehtari A (2017). “Comparison of Bayesian Predictive Methods for Model Selection.” Statistics and Computing, 27(3), 711–735. doi:10.1007/s11222-016-9649-y.

To cite the 'projpred' GLM paper:

Piironen J, Paasiniemi M, Vehtari A (2020). “Projective Inference in High-Dimensional Problems: Prediction and Feature Selection.” Electronic Journal of Statistics, 14(1), 2155–2197. doi:10.1214/20-EJS1711.

To cite the 'projpred' GLMMs, GAMs, and GAMMs paper:

Catalina A, Bürkner P, Vehtari A (2022). “Projection Predictive Inference for Generalized Linear and Additive Multilevel Models.” In Camps-Valls G, Ruiz F, Valera I (eds.), Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, volume 151 series Proceedings of Machine Learning Research, 4446–4461. https://proceedings.mlr.press/v151/catalina22a.html.

To cite the 'projpred' augmented-data projection paper:

Weber F, Glass Ä, Vehtari A (2023). “Projection Predictive Variable Selection for Discrete Response Families with Finite Support.” doi:10.48550/arXiv.2301.01660.

To cite the 'projpred' latent projection paper:

Catalina A, Bürkner P, Vehtari A (2021). “Latent Space Projection Predictive Inference.” doi:10.48550/arXiv.2109.04702.

Corresponding BibTeX entries:

  @Misc{,
    title = {{{projpred}}: {{Projection}} Predictive Feature
      Selection},
    author = {Juho Piironen and Markus Paasiniemi and Alejandro
      Catalina and Frank Weber and Aki Vehtari},
    year = {2023},
    note = {R package version 2.8.0},
    url = {https://mc-stan.org/projpred/},
    encoding = {UTF-8},
  }
  @Article{,
    title = {Comparison of {{Bayesian}} Predictive Methods for Model
      Selection},
    author = {Juho Piironen and Aki Vehtari},
    year = {2017},
    journal = {Statistics and Computing},
    volume = {27},
    number = {3},
    pages = {711--735},
    doi = {10.1007/s11222-016-9649-y},
  }
  @Article{,
    title = {Projective Inference in High-Dimensional Problems:
      {{Prediction}} and Feature Selection},
    author = {Juho Piironen and Markus Paasiniemi and Aki Vehtari},
    year = {2020},
    journal = {Electronic Journal of Statistics},
    volume = {14},
    number = {1},
    pages = {2155--2197},
    doi = {10.1214/20-EJS1711},
  }
  @InProceedings{,
    title = {Projection Predictive Inference for Generalized Linear and
      Additive Multilevel Models},
    booktitle = {Proceedings of {{The}} 25th {{International
      Conference}} on {{Artificial Intelligence}} and {{Statistics}}},
    author = {Alejandro Catalina and Paul-Christian Bürkner and Aki
      Vehtari},
    editor = {Gustau Camps-Valls and Francisco J. R. Ruiz and Isabel
      Valera},
    year = {2022},
    month = {28--30 Mar},
    series = {Proceedings of {{Machine Learning Research}}},
    volume = {151},
    pages = {4446--4461},
    publisher = {{PMLR}},
    url = {https://proceedings.mlr.press/v151/catalina22a.html},
    encoding = {UTF-8},
  }
  @Misc{,
    title = {Projection Predictive Variable Selection for Discrete
      Response Families with Finite Support},
    author = {Frank Weber and Änne Glass and Aki Vehtari},
    year = {2023},
    publisher = {{arXiv}},
    doi = {10.48550/arXiv.2301.01660},
    encoding = {UTF-8},
  }
  @Misc{,
    title = {Latent Space Projection Predictive Inference},
    author = {Alejandro Catalina and Paul Bürkner and Aki Vehtari},
    year = {2021},
    publisher = {{arXiv}},
    doi = {10.48550/arXiv.2109.04702},
    encoding = {UTF-8},
  }

Readme and manuals

projpred Stan Logo

The R package projpred performs the projection predictive variable selection for various regression models. Usually, the reference model will be an rstanarm or brms fit, but custom reference models can also be used. Details on supported model types are given in section “Supported types of models” of the main vignette[^1].

For details on how to cite projpred, see the projpred citation info on CRAN[^2]. Further references (including earlier work that projpred is based on) are given in section “Introduction” of the main vignette.

The vignettes[^3] illustrate how to use the projpred functions in conjunction. Details on the projpred functions as well as some shorter examples may be found in the documentation[^4].

Installation

There are two ways for installing projpred: from CRAN or from GitHub. The GitHub version might be more recent than the CRAN version, but the CRAN version might be more stable.

From CRAN
install.packages("projpred")
From GitHub

This requires the devtools package, so if necessary, the following code will also install devtools (from CRAN):

if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}
devtools::install_github("stan-dev/projpred", build_vignettes = TRUE)

To save time, you may omit build_vignettes = TRUE.

[^1]: The main vignette can be accessed offline by typing vignette(topic = "projpred", package = "projpred") or—more conveniently—browseVignettes("projpred") within R.

[^2]: The citation information can be accessed offline by typing print(citation("projpred"), bibtex = TRUE) within R.

[^3]: The overview of all vignettes can be accessed offline by typing browseVignettes("projpred") within R.

[^4]: The documentation can be accessed offline using ? or help() within R.

Help Manual

Help pageTopics
Projection predictive feature selectionprojpred-package projpred
Extract projected parameter draws and coerce to 'draws_matrix' (see package 'posterior')as_draws.projection as_draws_matrix.projection
Extract projected parameter draws and coerce to matrixas.matrix.projection
Inverse-link function for augmented-data projection with binomial familyaugdat_ilink_binom
Link function for augmented-data projection with binomial familyaugdat_link_binom
Break up matrix termsbreak_up_matrix_term
Weighted averaging within clusters of parameter drawscl_agg
Ranking proportions from fold-wise predictor rankingscv_proportions cv_proportions.ranking cv_proportions.vsel
Run search and performance evaluation with cross-validationcv_varsel cv_varsel.default cv_varsel.refmodel cv_varsel.vsel
Create cross-validation foldscv-indices cvfolds cv_folds cv_ids
Binomial toy exampledf_binom
Gaussian toy exampledf_gaussian
Extend a familyextend_family
Extra family objectsextra-families Student_t
Force search termsforce_search_terms
Mesquite data setmesquite
Predictive performance resultsperformances performances.vsel performances.vselsummary
Plot ranking proportions from fold-wise predictor rankingsplot.cv_proportions plot.ranking
Plot predictive performanceplot.vsel
Predictions from a submodel (after projection)pred-projection proj_linpred proj_predict
Predictions or log posterior predictive densities from a reference modelpredict.refmodel
Predictor terms used in a 'project()' runpredictor_terms predictor_terms.projection
Print information about 'project()' outputprint.projection
Print information about a reference model objectprint.refmodel
Print results (summary) of a 'varsel()' or 'cv_varsel()' runprint.vsel
Print summary of a 'varsel()' or 'cv_varsel()' runprint.vselsummary
Projection onto submodel(s)project
Predictor ranking(s)ranking ranking.vsel
Reference model and more general informationget_refmodel get_refmodel.default get_refmodel.projection get_refmodel.refmodel get_refmodel.stanreg get_refmodel.vsel init_refmodel refmodel-init-get
Create 'cvfits' from 'cvfun'run_cvfun run_cvfun.default run_cvfun.refmodel
Retrieve the full-data solution path from a 'varsel()' or 'cv_varsel()' run or the predictor combination from a 'project()' runsolution_terms solution_terms.projection solution_terms.vsel
Suggest submodel sizesuggest_size suggest_size.vsel
Summary of a 'varsel()' or 'cv_varsel()' runsummary.vsel
Run search and performance evaluation without cross-validationvarsel varsel.default varsel.refmodel varsel.vsel
Extract response values, observation weights, and offsetsy_wobs_offs