View source: R/regmest_regression.R
| regmest | R Documentation |
Compute elastic net M-estimates along a grid of penalization levels with optional penalty loadings for adaptive elastic net.
regmest(
x,
y,
alpha,
nlambda = 50,
lambda,
lambda_min_ratio,
scale,
starting_points,
penalty_loadings,
intercept = TRUE,
cc = 4.7,
eps = 1e-06,
explore_solutions = 10,
explore_tol = 0.1,
max_solutions = 10,
comparison_tol = sqrt(eps),
sparse = FALSE,
ncores = 1,
standardize = TRUE,
algorithm_opts = mm_algorithm_options(),
add_zero_based = TRUE,
mscale_bdp = 0.25,
mscale_opts = mscale_algorithm_options()
)
x |
|
y |
vector of response values of length |
alpha |
elastic net penalty mixing parameter with |
nlambda |
number of penalization levels. |
lambda |
optional user-supplied sequence of penalization levels.
If given and not |
lambda_min_ratio |
Smallest value of the penalization level as a fraction of the
largest level (i.e., the smallest value for which all coefficients are zero).
The default depends on the sample size relative to the number of variables and |
scale |
fixed scale of the residuals. |
starting_points |
a list of staring points, created by |
penalty_loadings |
a vector of positive penalty loadings (a.k.a. weights)
for different penalization of each coefficient. Only allowed for |
intercept |
include an intercept in the model. |
cc |
cutoff constant for Tukey's bisquare |
eps |
numerical tolerance. |
explore_solutions |
number of solutions to compute up to the desired precision |
explore_tol |
numerical tolerance for exploring possible solutions.
Should be (much) looser than |
max_solutions |
only retain up to |
comparison_tol |
numeric tolerance to determine if two solutions are equal.
The comparison is first done on the absolute difference in the value of the objective
function at the solution.
If this is less than |
sparse |
use sparse coefficient vectors. |
ncores |
number of CPU cores to use in parallel. By default, only one CPU core is used. Not supported on all platforms, in which case a warning is given. |
standardize |
logical flag to standardize the |
algorithm_opts |
options for the MM algorithm to compute estimates.
See |
add_zero_based |
also consider the 0-based regularization path in addition to the given starting points. |
mscale_bdp, mscale_opts |
options for the M-scale estimate used to standardize
the predictors (if |
a list-like object with the following items
alphathe sequence of alpha parameters.
lambdaa list of sequences of penalization levels, one per alpha parameter.
scalethe used scale of the residuals.
estimatesa list of estimates. Each estimate contains the following information:
interceptintercept estimate.
betabeta (slope) estimate.
lambdapenalization level at which the estimate is computed.
alphaalpha hyper-parameter at which the estimate is computed.
objf_valuevalue of the objective function at the solution.
statuscodeif > 0 the algorithm experienced issues when
computing the estimate.
statusoptional status message from the algorithm.
callthe original call.
regmest_cv() for selecting hyper-parameters via cross-validation.
coef.pense_fit() for extracting coefficient estimates.
plot.pense_fit() for plotting the regularization path.
Other functions to compute robust estimates:
pense()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.