View source: R/internal_functions.R
| sample_lm_hs | R Documentation |
Sample 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.
sample_lm_hs(y, X, params, XtX = NULL, X_test = NULL)
y |
|
X |
|
params |
the named list of parameters containing
|
XtX |
the |
X_test |
matrix of predictors at test points (default is NULL) |
The updated named list params with draws from the full conditional distributions
of sigma and coefficients (along with updated mu and mu_test if applicable).
The parameters in coefficients are:
beta the p x 1 vector of regression coefficients
sigma_beta p x 1 vector of regression coefficient standard deviations
(local scale parameters)
xi_sigma_beta p x 1 vector of parameter-expansion variables for sigma_beta
lambda_beta the global scale parameter
xi_lambda_beta parameter-expansion variable for lambda_beta
components of beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.