This is a convenience wrapper around pense_cv()
and regmest_cv()
, for the common usecase of computing
a highlyrobust Sestimate followed by a more efficient Mestimate using the scale of the residuals from the
Sestimate.
pensem_cv(x, ...) # S3 method for default pensem_cv( x, y, alpha = 0.5, nlambda = 50, lambda_min_ratio, lambda_m, lambda_s, standardize = TRUE, penalty_loadings, intercept = TRUE, bdp = 0.25, ncores = 1, sparse = FALSE, eps = 1e06, cc = 4.7, cv_k = 5, cv_repl = 1, cl = NULL, cv_metric = c("tau_size", "mape", "rmspe"), add_zero_based = TRUE, explore_solutions = 10, explore_tol = 0.1, max_solutions = 10, fit_all = TRUE, comparison_tol = sqrt(eps), algorithm_opts = mm_algorithm_options(), mscale_opts = mscale_algorithm_options(), nlambda_enpy = 10, enpy_opts = enpy_options(), ... ) # S3 method for pense_cvfit pensem_cv( x, scale, alpha, nlambda = 50, lambda_min_ratio, lambda_m, standardize = TRUE, penalty_loadings, intercept = TRUE, bdp = 0.25, ncores = 1, sparse = FALSE, eps = 1e06, cc = 4.7, cv_k = 5, cv_repl = 1, cl = NULL, cv_metric = c("tau_size", "mape", "rmspe"), add_zero_based = TRUE, explore_solutions = 10, explore_tol = 0.1, max_solutions = 10, fit_all = TRUE, comparison_tol = sqrt(eps), algorithm_opts = mm_algorithm_options(), mscale_opts = mscale_algorithm_options(), x_train, y_train, ... )
x  either a numeric matrix of predictor values, or a crossvalidated PENSE fit from 

...  ignored. See the section on deprecated parameters below. 
y  vector of response values of length 
alpha  elastic net penalty mixing parameter with \(0 \le \alpha \le 1\). 
nlambda  number of penalization levels. 
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 
lambda_m, lambda_s  optional usersupplied sequence of penalization levels for the S and Mestimates.
If given and not 
standardize  logical flag to standardize the 
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. 
bdp  desired breakdown point of the estimator, between 0 and 0.5. 
ncores  number of CPU cores to use in parallel. By default, only one CPU core is used. May not be supported on your platform, in which case a warning is given. 
sparse  use sparse coefficient vectors. 
eps  numerical tolerance. 
cc  cutoff constant for Tukey's bisquare \(\rho\) function in the Mestimation objective function. 
cv_k  number of folds per crossvalidation. 
cv_repl  number of crossvalidation replications. 
cl  a parallel cluster. Can only be used if 
cv_metric  either a string specifying the performance metric to use, or a function to evaluate prediction errors in a single CV replication. If a function, the number of arguments define the data the function receives. If the function takes a single argument, it is called with a single numeric vector of prediction errors. If the function takes two or more arguments, it is called with the predicted values as first argument and the true values as second argument. The function must always return a single numeric value quantifying the prediction performance. The order of the given values corresponds to the order in the input data. 
add_zero_based  also consider the 0based regularization path. See details for a description. 
explore_solutions  number of solutions to compute up to the desired precision 
explore_tol  numerical tolerance and maximum number of iterations for exploring possible solutions.
The tolerance should be (much) looser than 
max_solutions  only retain up to 
fit_all  If 
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 
algorithm_opts  options for the MM algorithm to compute the estimates. See 
mscale_opts  options for the Mscale estimation. See 
nlambda_enpy  number of penalization levels where the ENPY initial estimate is computed. 
enpy_opts  options for the ENPY initial estimates, created with the

scale  initial scale estimate to use in the Mestimation. By default the Sscale from the PENSE fit is used. 
x_train, y_train  override arguments 
an object of crossvalidated regularized Mestimates as returned from regmest_cv()
.
The builtin CV metrics are
"tau_size"
\(\tau\)size of the prediction error, computed by tau_size()
(default).
"mape"
Median absolute prediction error.
"rmspe"
Root mean squared prediction error.
"auroc"
Area under the receiver operator characteristic curve (actually 1  AUROC). Only sensible for binary responses.
pense_cv()
to compute the starting Sestimate.
Other functions to compute robust estimates with CV:
pense_cv()
,
regmest_cv()