Learn R Programming

clogitL1 (version 1.5)

print.clogitL1: Printing after fitting conditional logistic regression with elastic net penalties

Description

Takes a clogitL1 object and prints a summary of the sequence of models fitted.

Usage

# S3 method for clogitL1
print (x, digits = 6, ...)

Arguments

x

an object of type clogitL1.

digits

the number of significant digits after the decimal to be printed

...

additional arguments to print function

Details

prints a 3 column data frame with columns:

  • Df: number of non-zero parameters in model

  • DevPerc: percentage of null deviance explained by current model

  • Lambda: associated \(\lambda\) value

References

http://www.jstatsoft.org/v58/i12/

See Also

clogitL1

Examples

Run this code
# NOT RUN {
set.seed(145)

# data parameters
K = 10 # number of strata
n = 5 # number in strata
m = 2 # cases per stratum
p = 20 # predictors

# generate data
y = rep(c(rep(1, m), rep(0, n-m)), K)
X = matrix (rnorm(K*n*p, 0, 1), ncol = p) # pure noise
strata = sort(rep(1:K, n))

par(mfrow = c(1,2))
# fit the conditional logistic model
clObj = clogitL1(y=y, x=X, strata)
clObj
# }

Run the code above in your browser using DataLab