nclreg_fit {mpath} | R Documentation |
Internal function to fitting a nonconvex loss based robust linear model with regularization
Description
Fit a linear model via penalized nonconvex loss function. The regularization path is computed for the lasso (or elastic net penalty), scad (or snet) and mcp (or mnet penalty), at a grid of values for the regularization parameter lambda.
Usage
nclreg_fit(x, y, weights, offset, rfamily=c("clossR", "closs", "gloss", "qloss"),
s=NULL, fk=NULL, iter=10, reltol=1e-5,
penalty=c("enet","mnet","snet"), nlambda=100,lambda=NULL,
type.path=c("active", "nonactive", "onestep"), decreasing=FALSE,
lambda.min.ratio=ifelse(nobs<nvars,.05, .001), alpha=1, gamma=3,
standardize=TRUE, intercept=TRUE, penalty.factor=NULL, maxit=1000,
type.init=c("bst", "ncl", "heu"), mstop.init=10, nu.init=0.1,
eps=.Machine$double.eps, epscycle=10, thresh=1e-6, trace=FALSE)
Arguments
x |
input matrix, of dimension nobs x nvars; each row is an observation vector. |
y |
response variable. Quantitative for |
weights |
observation weights. Can be total counts if responses are proportion matrices. Default is 1 for each observation |
offset |
this can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases. Currently only one offset term can be included in the formula. |
rfamily |
Response type and relevant loss functions (see above) |
s |
nonconvex loss tuning parameter for robust regression and classification. The |
fk |
predicted values at an iteration in the MM algorithm |
nlambda |
The number of |
lambda |
by default, the algorithm provides a sequence of regularization values, or a user supplied |
type.path |
solution path. If |
lambda.min.ratio |
Smallest value for |
alpha |
The |
gamma |
The tuning parameter of the |
standardize |
logical value for x variable standardization, prior to
fitting the model sequence. The coefficients are always returned on
the original scale. Default is |
intercept |
logical value: if TRUE (default), intercept(s) are fitted; otherwise, intercept(s) are set to zero |
penalty.factor |
This is a number that multiplies |
type.init |
a method to determine the initial values. If |
mstop.init |
an integer giving the number of boosting iterations when |
nu.init |
a small number (between 0 and 1) defining the step size or shrinkage parameter when |
decreasing |
only used if |
iter |
number of iteration in the MM algorithm |
maxit |
Within each MM algorithm iteration, maximum number of coordinate descent iterations for each |
reltol |
convergency criteria |
eps |
If a coefficient is less than |
epscycle |
If |
thresh |
Convergence threshold for coordinate descent. Defaults value is |
penalty |
Type of regularization |
trace |
If |
Details
The sequence of robust models implied by lambda
is fit by majorization-minimization along with coordinate
descent. Note that the objective function is
weights*loss + \lambda*penalty,
if standardize=FALSE
and
\frac{weights}{\sum(weights)}*loss + \lambda*penalty,
if standardize=TRUE
.
Value
An object with S3 class "nclreg"
for the various types of models.
call |
the call that produced the model fit |
b0 |
Intercept sequence of length |
beta |
A |
lambda |
The actual sequence of |
decreasing |
if |
Author(s)
Zhu Wang <zwang145@uthsc.edu>
References
Zhu Wang (2021), MM for Penalized Estimation, TEST, doi: 10.1007/s11749-021-00770-2