View source: R/internal_functions.R
| init_lm_ridge | R Documentation |
Initialize the parameters for a linear regression model assuming a
ridge prior for the (non-intercept) coefficients. The number of predictors
p may exceed the number of observations n.
init_lm_ridge(y, X, X_test = NULL)
y |
|
X |
|
X_test |
|
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
The parameters in coefficients are:
beta: the p x 1 vector of regression coefficients
sigma_beta: the prior standard deviation for the (non-intercept)
components of beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.