Skip to content

Projection predictive input variable selection using Stan+R

License

Notifications You must be signed in to change notification settings

jpiironen/rstan-varsel

Repository files navigation

Projection predictive input variable selection using Stan+R

Note: the codes in this repository are deprecated and superseded by the more sophisticated package projpred, which has many more features and is easier to use.

This repository contains simple example codes for performing projection predictive variable selection for linear regression models using Stan+R. The method is described in detail in the document. See also our comparative study for performance evaluation of the method (Piironen and Vehtari, 2016).

Example

You should have RStan installed. Run first

library(rstan)
source('projection.R')

After that you can run one of the main scripts, either

source('search.R')

or

source('search_cv.R')

Both of these will take some time to execute, but you can reduce the running time by reducing the number of samples generated by Stan (see files search.R and search.R)

References

Piironen, J. and Vehtari, A. (2016). Comparison of Bayesian predictive methods for model selection. Statistics and Computing (online)

Licence

This software is distributed under the GNU General Public Licence (version 3 or later); please refer to the file licence.txt, included with the software, for details.

About

Projection predictive input variable selection using Stan+R

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published