brms (version 1.10.2)

lasso: Set up a lasso prior in brms


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.


lasso(df = 1, scale = 1)



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


Scale of the lasso prior. Defaults to 1.


A character string obtained by with additional arguments.


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 standarized all variables, you can adjust the general scale of the lasso prior via argument scale, for instance, lasso(1, scale = 10).


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

See Also



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

# }

Run the code above in your browser using DataCamp Workspace