summary.cv.clogitL1: Summary after cross validation of conditional logistic...

Description Usage Arguments Details Value References See Also Examples

Description

Provides summary of conditional logistic regression models after cross validation

Usage

1
2
 ## S3 method for class 'cv.clogitL1'
 summary(object, ...)

Arguments

object

an object of type cv.clogitL1 for which the summary is to be produced.

...

additional arguments to summary method.

Details

Extracts pertinent information from the supplied cv.clogitL1 objects. See below for details on output value.

Value

A list with the following fields:

lambda_minCV

value of regularisation parameter minimising CV deviance

beta_minCV

coefficient profile at the minimising value of the regularisation parameter. Whole dataset used to compute estimates.

nz_beta_minCV

number of non-zero coefficients in the CV deviance minimising coefficient profile.

lambda_minCV1se

value of regularisaion parameter minimising CV deviance (using 1 standard error rule)

beta_minCV1se

coefficient profile at the 1-standard-error-rule value of the regularisation parameter. Whole dataset used to compute estimates.

nz_beta_minCV1se

number of non-zero coefficients in the 1-standard-error-rule coefficient profile.

References

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

See Also

clogitL1, plot.cv.clogitL1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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)
plot(clObj, logX=TRUE)

# cross validation
clcvObj = cv.clogitL1(clObj)
summary(clcvObj)

Example output

Loading required package: Rcpp
$lambda_minCV
[1] 3.733147

$beta_minCV
 [1]  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000
 [7]  0.1585915  0.0000000 -0.3156250  0.0000000  0.0000000  0.0000000
[13]  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000
[19]  0.0000000  0.0000000

$nz_beta_minCV
[1] 2

$lambda_minCV1se
[1] 4.286226

$beta_minCV1se
 [1]  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000
 [7]  0.1029346  0.0000000 -0.2615253  0.0000000  0.0000000  0.0000000
[13]  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000
[19]  0.0000000  0.0000000

$nz_beta_minCV1se
[1] 2

clogitL1 documentation built on May 2, 2019, 3 p.m.