Last data update: 2014.03.03

R: Plot false inclusion rate curves
plot.firR Documentation

Plot false inclusion rate curves

Description

Plot false inclusion rate curves from an "fir" or "perm.ncvreg" object.

Usage

## S3 method for class 'fir'
plot(x, type=c("FIR", "EF"), log.l=FALSE, legend=TRUE,
...)

Arguments

x

A "perm.ncvreg" or "fir" object.

type

What to plot on the vertical axis. FIR plots the false inclusion rate; EF plots the expected number of false inclusions along with the actual number of variables included in the model.

log.l

Should horizontal axis be on the log scale? Default is FALSE.

legend

For type="EF" plots, draw a legend to indicate which line is for the actual selections and which line is for the expected number of false inclusions? Default is TRUE.

...

Other graphical parameters to pass to plot

Author(s)

Patrick Breheny <patrick-breheny@uiowa.edu>

See Also

fir, perm.ncvreg

Examples

data(prostate)
X <- as.matrix(prostate[,1:8])
y <- prostate$lpsa
fit <- ncvreg(X, y)

f <- fir(fit)
cbind(EF=f$EF, S=f$S, FIR=f$FIR)[1:10,]

# Some plotting options
plot(f)
plot(f, type="EF")
plot(f, log=TRUE)


# Comparison with perm.ncvreg
par(mfrow=c(2,2))
plot(f)
plot(f, type="EF")
pmfit <- perm.ncvreg(X, y)
plot(pmfit)
plot(pmfit, type="EF")
## Note that fir() is more conservative

Results