plot.cv.clogitL1: Plotting after cross validating conditional logistic...

Description Usage Arguments References See Also Examples

Description

Takes a cv.clogitL1 object and plots the CV deviance curve with standard error bands and minima.

Usage

1
2
 ## S3 method for class 'cv.clogitL1'
 plot(x, ...)

Arguments

x

an object of type cv.clogitL1.

...

additional arguments to plot function

References

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

See Also

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)
plot(clcvObj)

Example output

Loading required package: Rcpp

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