Fits multiple penalized regression models in which the residuals
are randomly permuted, thereby allowing estimation of the false inclusion
rate.
Usage
permres(fit, ...)
## S3 method for class 'ncvreg'
permres(fit, lambda, N=10, seed, trace=FALSE, ...)
Arguments
fit
A fitted ncvreg model, as produced by ncvreg().
To use with permres, the model must be fit using the
returnX=TRUE option.
lambda
The regularization parameter to use for estimating residuals.
Unlike perm.ncvreg, permres calculates EF and FIR for
a specific lambda value, not an entire path. As a result, it runs
much faster.
N
The number of permutation replications. Default is 10.
seed
You may set the seed of the random number generator in
order to obtain reproducible results.
trace
If set to TRUE, perm.ncvreg will inform the user of its progress
by announcing the beginning of each permutation fit. Default is FALSE.
...
Not used.
Details
The function fits a penalized regression model to the actual data,
then repeats the process 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).
Value
A list with the following components:
EF
The number of variables selected at each value of
lambda, averaged over the permutation fits.
S
The actual number of selected variables for the non-permuted
data.
FIR
The estimated false inclusion rate (EF/S).
loss
The loss/deviance, averaged over the permutation fits. This is an
estimate of the explanatory power of the model under null conditions, and
can be used to adjust the loss of the fitted model in a manner akin to
the idea of an adjusted R-squared in classical regression.
Author(s)
Patrick Breheny <patrick-breheny@uiowa.edu>
See Also
ncvreg, fir, perm.ncvreg
Examples
data(prostate)
X <- as.matrix(prostate[,1:8])
y <- prostate$lpsa
fit <- ncvreg(X, y, returnX = TRUE, N=50)
permres(fit, lambda=0.15)