glm.regu.path {RCAL} | R Documentation |
Regularied M-estimation for fitting generalized linear models along a regularization path
Description
This function implements regularized M-estimation for fitting generalized linear models with binary or contiunous responses along a regularization path.
Usage
glm.regu.path(nrho = NULL, rho.seq = NULL, y, x, iw = NULL,
loss = "cal", n.iter = 100, eps = 1e-06, tune.fac = 0.5,
tune.cut = TRUE, ann.init = TRUE, nz.lab = NULL)
Arguments
nrho |
The number of tuning parameters in a regularization path. |
rho.seq |
A vector of tuning parameters in a regularization path. If both |
y |
An |
x |
An |
iw |
An |
loss |
A loss function, which can be specified as "gaus" for continuous responses, or "ml" or "cal" for binary respones. |
n.iter |
The maximum number of iterations allowed as in |
eps |
The tolerance used to declare convergence as in |
tune.fac |
The multiplier (factor) used to define rho.seq if only |
tune.cut |
Logical; if |
ann.init |
Logical; if |
nz.lab |
A |
Details
If not specified by users, the sequence of tuning parameters (i.e., the regularization path) is defined as a geometric series
of length nrho
, starting from the value which yields a zero solution, and then decreasing by a factor tune.fac
successively.
Value
rho |
The vector of tuning parameters included in the regularization path. |
non.conv |
A vector indicating the non-convergene status found or imputed if |
nz.all |
A vector giving the numbers of nonzero coefficients estimated, along the regularization path. |
bet.all |
A matrix giving estimated intercept and coefficients, column by column, along the regularization path. |
fit.all |
A matrix giving fitted values, column by column, along the regularization path. |
References
Tan, Z. (2020a) Regularized calibrated estimation of propensity scores with model misspecification and high-dimensional data, Biometrika, 107, 137–158.
Tan, Z. (2020b) Model-assisted inference for treatment effects using regularized calibrated estimation with high-dimensional data, Annals of Statistics, 48, 811–837.
Examples
data(simu.data)
n <- dim(simu.data)[1]
p <- dim(simu.data)[2]-2
y <- simu.data[,1]
tr <- simu.data[,2]
x <- simu.data[,2+1:p]
x <- scale(x)
### Example 1: linear regression
out.rgaus.path <- glm.regu.path(rho.seq=c(.01, .02, .05, .1, .2, .5), y=y[tr==1], x=x[tr==1,],
loss="gaus")
# the estimated intercept and coefficients; the first 10 are shown
out.rgaus.path$bet.all[1:10,]
### Example 2: logistic regression using likelihood loss
out.rml.path <- glm.regu.path(rho.seq=c(.002, .005, .01, .02, .05, .1), y=tr, x=x, loss="ml")
out.rml.path$bet.all[1:10,]
### Example 3: logistic regression using calibration loss
out.rcal.path <- glm.regu.path(rho.seq=c(.005, .01, .02, .05, .1, .2), y=tr, x=x, loss="cal")
out.rcal.path$bet.all[1:10,]