Projection predictive input variable selection using Stan+R
R Stan
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
crimedata.csv
document.pdf
lg_t.stan
lg_tplus.stan
projection.R
search.R
search_cv.R

README.md

Projection predictive input variable selection using Stan+R

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)