Initialize the parameters for a linear regression model assuming a
horseshoe prior for the (non-intercept) coefficients. The number of predictors
p
may exceed the number of observations n
.
init_lm_hs(y, X, X_test = NULL)
a named list params
containing at least
mu
: vector of conditional means (fitted values)
sigma
: the conditional standard deviation
coefficients
: a named list of parameters that determine mu
Additionally, if X_test is not NULL, then the list includes an element
mu_test
, the vector of conditional means at the test points
n x 1
vector of data
n x p
matrix of predictors
n0 x p
matrix of predictors at test points (default is NULL)