irglmreg_fit {mpath} | R Documentation |
Internal function for robust penalized generalized linear models
Description
Fit a robust penalized GLM where the loss function is a composite function cfun
odfun
+ penalty. This does computing for irglmreg
.
Usage
irglmreg_fit(x, y, weights, offset, cfun="ccave", dfun="gaussian", s=NULL,
delta=0.1, fk=NULL, iter=10, reltol=1e-5,
penalty=c("enet","mnet","snet"), nlambda=100, lambda=NULL,
type.path=c("active", "nonactive"), decreasing=TRUE,
lambda.min.ratio=ifelse(nobs<nvars,.05, .001), alpha=1, gamma=3,
rescale=TRUE, standardize=TRUE, intercept=TRUE,
penalty.factor= NULL, maxit=1000, type.init=c("bst", "co", "heu"),
init.family=NULL, mstop.init=10, nu.init=0.1,
eps=.Machine$double.eps, epscycle=10, thresh=1e-6, parallel=FALSE,
n.cores=2, theta, trace=FALSE, tracelevel=1)
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. |
cfun |
character, type of convex cap (concave) function.
|
dfun |
character, type of convex downward function.
|
s |
tuning parameter of |
delta |
a small positive number provided by user only if |
fk |
predicted values at an iteration in the IRCO algorithm |
nlambda |
The number of |
lambda |
by default, the algorithm provides a sequence of regularization values, or a user supplied |
type.path |
solution path for |
lambda.min.ratio |
Smallest value for |
alpha |
The |
gamma |
The tuning parameter of the |
rescale |
logical value, if TRUE, adaptive rescaling of the penalty parameter for |
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 |
init.family |
character value for initial family, one of "clossR", "closs","gloss","qloss", which can be used to derive an initial estimator, if the selection is different from the default value |
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 IRCO algorithm |
maxit |
Within each IRCO algorithm iteration, maximum number of coordinate descent iterations for each |
reltol |
convergency criteria in the IRCO algorithm |
eps |
If a coefficient is less than |
epscycle |
If |
thresh |
Convergence threshold for coordinate descent. Defaults value is |
penalty |
Type of regularization |
theta |
an overdispersion scaling parameter for |
parallel , n.cores |
If |
trace , tracelevel |
If |
Details
A case weighted penalized least squares or GLM is fit by the iteratively reweighted convex optimization (IRCO), where the loss function is a composite function cfun
odfun
+ penalty. Here convex is the loss function induced by dfun
, not the penalty function.
The sequence of robust models implied by lambda
is fit by IRCO 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 "irglmreg"
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 |
weights_update |
A |
decreasing |
if |
Author(s)
Zhu Wang <zwang145@uthsc.edu>
References
Zhu Wang (2024) Unified Robust Estimation, Australian & New Zealand Journal of Statistics. 66(1):77-102.