Learn R Programming

brms (version 2.19.0)

lasso: Set up a lasso prior in brms

Description

Function used to set up a lasso prior for population-level effects in brms. The function does not evaluate its arguments -- it exists purely to help set up the model.

Usage

lasso(df = 1, scale = 1)

Value

A character string obtained by match.call() with additional arguments.

Arguments

df

Degrees of freedom of the chi-square prior of the inverse tuning parameter. Defaults to 1.

scale

Scale of the lasso prior. Defaults to 1.

Details

The lasso prior is the Bayesian equivalent to the LASSO method for performing variable selection (Park & Casella, 2008). With this prior, independent Laplace (i.e. double exponential) priors are placed on the population-level effects. The scale of the Laplace priors depends on a tuning parameter that controls the amount of shrinkage. In brms, the inverse of the tuning parameter is used so that smaller values imply more shrinkage. The inverse tuning parameter has a chi-square distribution and with degrees of freedom controlled via argument df of function lasso (defaults to 1). For instance, one can specify a lasso prior using set_prior("lasso(1)"). To make sure that shrinkage can equally affect all coefficients, predictors should be one the same scale. If you do not want to standardized all variables, you can adjust the general scale of the lasso prior via argument scale, for instance, lasso(1, scale = 10).

References

Park, T., & Casella, G. (2008). The Bayesian Lasso. Journal of the American Statistical Association, 103(482), 681-686.

See Also

set_prior

Examples

Run this code
set_prior(lasso(df = 1, scale = 10))

Run the code above in your browser using DataLab