festLASSO {eshrink} | R Documentation |
Compute ‘Future Loss’ Ridge or LASSO Estimates
Description
Computes a ridge or LASSO estimate for a given regression problem, with penalty parameter chosen to minimize bias and variance.
Usage
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,
...
)
Arguments
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. |
Details
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(\beta)^2, Var(\beta))
and fMSE
, which uses the loss function
fMSE = Bias(\beta)^2 + Var(\beta)
.
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.
See Also
mseRidge,vcovfestRidge, simLASSO, check_CIbound