permres(fit, ...)
## S3 method for class 'ncvreg':
permres(fit, lambda, N=10, seed, trace=FALSE, \dots)ncvreg().
To use with permres, the model must be fit using the
returnX=TRUE option.perm.ncvreg, permres calculates EF and FIR for
a specific lambda value, not an entire path. As a rlambda, averaged over the permutation fits.EF/S).N times with a permuted version of the
response vector. This allows estimation of the expected number of
variables included by chance for each value of lambda. The
ratio of this expected quantity to the number of selected variables
using the actual (non-permuted) response is called the false inclusion
rate (FIR).ncvreg, fir, perm.ncvregdata(prostate)
X <- as.matrix(prostate[,1:8])
y <- prostate$lpsa
fit <- ncvreg(X, y, returnX = TRUE, N=50)
permres(fit, lambda=0.15)Run the code above in your browser using DataLab