logit.reg: Cyclic Coordinate Descent for Logistic regression

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Cyclic Coordinate Descent for Logistic regression with p predictors and n cases

Usage

1
logit.reg(X, Y, lambda = 1)

Arguments

X

p x n design matrix - Note that the rows of X correspond to predictors and the columns to cases.

Y

Outcome of length n

lambda

Penalization Parameter. For optimal lambda, use cv.logit.reg.

Details

logit.reg performs an algorithm for estimating regression coefficients in a penalized logistic regression model. The algorithm is based on cyclic coordinate descent.

Value

X

The design matrix.

cases

The number of cases

predictors

The number of predictors

lambda

The value of penalization parameter lambda used.

residual

A vector of length p listing the residuals

estimate

The estimate of the coefficients

nonzeros

The number "selected" variables included in the model.

selected

The name of the "selected" variables included in the model.

Author(s)

Edward Grant, Kenneth Lange, Tong Tong Wu

Maintainer: Edward Grant edward.m.grant@gmail.com

References

Wu, T.T., Chen, Y.F., Hastie, T., Sobel E. and Lange, K. (2009). Genome-wide association analysis by lasso penalized logistic regression. Bioinformatics, Volume 25, No 6, 714-721.

See Also

print.logit.reg

summary.logit.reg

cv.logit.reg

plot.cv.logit.reg

l1.reg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
set.seed(1001)
n=500;p=5000
beta=c(1,1,1,1,1,rep(0,p-5))
x=matrix(rnorm(n*p),p,n)
xb = t(x) %*% beta
logity=exp(xb)/(1+exp(xb))
y=rbinom(n=length(logity),prob=logity,size=1)

rownames(x)<-1:nrow(x)
colnames(x)<-1:ncol(x)

#Lasso penalized logistic regression using optimal lambda
out<-logit.reg(x,y,50)
print(out)

#Re-estimate parameters without penalization
out2<-logit.reg(x[out$selected,],y,0)
out2

CDLasso documentation built on May 1, 2019, 8:02 p.m.