Skip to contents

Given output from a Bayesian model, compute an (adaptive) lasso search path to provide linear variable selection. This function only indicates the variables selected along the path.

Usage

lasso_path(yy_hat, XX, wts = NULL, ww_hat = NULL)

Arguments

yy_hat

vector of fitted values

XX

matrix of covariates

wts

vector of observation weights (for weighted least squares)

ww_hat

vector of weights for the adaptive lasso

Value

inclusion_index: the matrix of inclusion indicators (columns) for each subset returned (rows)

Details

If an intercept is in the XX matrix, it is assumed that (i) the intercept is the first column and (ii) the intercept should be included in each subset.