Description Usage Arguments Details See Also
View source: R/functions_ridge.R
Computes a ridge or LASSO estimate for a given regression problem, with penalty parameter chosen to minimize bias and variance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | festLASSO(
X,
y,
loss = c("fMSE", "fMBV", "both"),
ind = 1,
lseq,
B = 500,
penalize,
rescale.lambda = TRUE,
scale = FALSE,
returnMSE = FALSE,
postsamp,
returnPS = FALSE,
nPost = 1000,
se.version = c("varExp", "full", "none"),
...
)
festRidge(
X,
y,
loss = c("fMSE", "fMBV", "both"),
ind = 1,
lseq,
penalize,
scale = FALSE,
returnMSE = FALSE,
postsamp,
returnPS = FALSE,
nPost = 1000,
se.version = c("varExp", "full", "none"),
XtXlamIinv = NULL,
...
)
|
X |
Design matrix for the regression. Assumed to contain only numeric values, so
any factors should be coded according to desired contrast (e.g., via |
y |
Outcome vector. Unless |
loss |
Loss function for choosing the penalty parameter. See details. |
ind |
Vector of integers or logicals indicating which coefficients the loss is to be computed on. |
lseq |
Sequence of penalty values to consider. |
B |
Number of future datasets to simulate for each point in posterior sample. |
penalize |
See |
rescale.lambda |
If |
scale |
Logical indicating whether the design matrix X be scaled. See details. |
returnMSE |
Logical indicating whether mse object should be returned. |
postsamp |
List containing posterior sample (from |
returnPS |
logical indicating whether or not the full posterior sample should be included in output. |
nPost |
Size of posterior sample to compute |
se.version |
String indicating which version of standard errors to use. See |
... |
Other arguments passed to |
XtXlamIinv |
explicit value of (X'X + diag(penalty))^-1. Useful for simulations to save computation. |
The value of the ridge or LASSO penalty is selected by minimizing the
posterior expectation of the loss function, which is chosen by the argument
loss. Possible options are fMBV, which uses the loss function
fMBV = max(Bias(β)^2, Var(β)) and fMSE, which uses the loss function
fMSE = Bias(β)^2 + Var(β).
To balance the influence of covariates, it is recommended
that the design matrix be standardized. This can be done by
the user or via the argument scale. If scale=TRUE,
then coefficient and standard error estimates are back-transformed.
Use the XtXlamIinv argument with caution. No checks are done on the provided
value. Note that lseq is re-ordered to be decreasing, and provided values
of XtXlamIinv must account for this.
mseRidge,vcovfestRidge, simLASSO, check_CIbound
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.