if (FALSE) {
# fit a simple model
fit <- brm(count ~ zAge + zBase * Trt,
data = epilepsy, family = poisson())
summary(fit)
# The following code requires the 'projpred' package to be installed:
library(projpred)
# 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)
}
Run the code above in your browser using DataLab