Learn R Programming

ncvreg (version 3.4-0)

fir: False inclusion rates for ncvreg (independence approximation)

Description

Estimates false inclusion rates (FIR) for penalized regression models based on an approximation of independence between the predictors.

Usage

fir(fit)

Arguments

fit
An ncvreg object.

Value

  • An object with S3 class "fir" containing:
  • EFThe number of variables selected at each value of lambda, averaged over the permutation fits.
  • SThe actual number of selected variables for the non-permuted data.
  • FIRThe estimated false inclusion rate (EF/S).

Details

The function estimates the false inclusion rate (FIR) for a penalized regression model. The calculation is based on an approximation of independence between the predictors, and is reasonably accurate in near-independent settings. However, the estimate is conservative when predictors are correlated. For a more accurate estimate of the false inclusion rate in the presence of correlated predictors, see perm.ncvreg.

See Also

ncvreg, plot.fir, perm.ncvreg

Examples

Run this code
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,]

## 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

Run the code above in your browser using DataLab