Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

varsel.brmsfit

Projection Predictive Variable Selection


Description

Perform projection predictive variable selection with the projpred package. See varsel and cv_varsel for more details.

Usage

## S3 method for class 'brmsfit'
varsel(object, ...)

## S3 method for class 'brmsfit'
cv_varsel(object, ...)

Arguments

object

A brmsfit object.

...

Further arguments passed to get_refmodel.brmsfit as well as varsel.refmodel or cv_varsel.refmodel.

Value

A vsel object for which several methods are available in the projpred package.

Examples

## Not run: 
# fit a simple model
fit <- brm(count ~ zAge + zBase * Trt,
           data = epilepsy, family = poisson())
summary(fit)

# perform variable selection without cross-validation
vs <- varsel(fit)
summary(vs)
plot(vs)

# perform variable selection with cross-validation
cv_vs <- cv_varsel(fit)
summary(cv_vs)
plot(cv_vs)

## End(Not run)

brms

Bayesian Regression Models using 'Stan'

v2.15.0
GPL-2
Authors
Paul-Christian Bürkner [aut, cre], Jonah Gabry [ctb], Sebastian Weber [ctb], Andrew Johnson [ctb], Martin Modrak [ctb]
Initial release
2021-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.