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