apple {apple} | R Documentation |
Fit a generalized linear model via penalized maximum likelihood. The regularization path is computed for the LASSO or MCP penalty at a grid of values for the regularization parameter lambda. Can deal all shapes of data, including very large sparse data matrices. Fits binomial-logistic and poisson regression models.
apple(X, y, family="binomial", penalty = "LASSO", gamma, cha.poi = 1, eps = 1e-15, lam.list, lambda.min.ratio, max.iter = 100, max.num, n.lambda = 100)
X |
input matrix, of dimension nobs x nvars; each row is an observation vector. |
y |
response variable, of dimension nobs x 1. non-negative counts for
|
family |
response type. |
penalty |
|
gamma |
the MCP concavity parameter. |
cha.poi |
the value used to change from Newton Raphson correction to Coordinate Descent correction, which is the α in the following inequality, k> α√{n}, where k is the size of current active set. when this inequality holds, the correction method changes from Newton Raphson to Coordinate Descent. |
eps |
the precision used to test the convergence. |
lam.list |
a user supplied λ sequence. typical usage is to have the program compute its own |
lambda.min.ratio |
optional input. smallest value for |
max.iter |
maximum number of iteration in the computation. |
max.num |
optional input. maximum number of nonzero coefficients. |
n.lambda |
the number of |
a0 |
intercept vector of length( |
beta |
nvar x length( |
lambda |
the list of lambda derived the solution path. |
ebic |
the list of EBIC values. |
ebic.loc |
the location of the EBIC selected solution in the path. |
family |
the family of the supplied dataset. |
Yi Yu and Yang Feng
Yi Yu and Yang Feng, APPLE: Approximate Path for Penalized Likelihood Estimator, manuscript.
plot.apple
, cv.apple
and predict.apple
p=10 n=200 d=5 coefs=c(3,1.5,0,0,2) intercept=0 beta=rep(0,p) beta[1:d]=coefs X=matrix(rnorm(p*n), nrow=n) mu=1/(1+exp(-X %*% beta-intercept)) y=rbinom(n,1,mu) fit.apple=apple(X, y, family= "binomial") plot(fit.apple)