mfdr {ncvreg} | R Documentation |
Marginal false discovery rates
Description
Estimates the marginal false discovery rate (mFDR) of a penalized regression model.
Usage
mfdr(fit, X)
Arguments
fit |
An |
X |
The model matrix corresponding to |
Details
The function estimates the marginal false discovery rate (mFDR) for a
penalized regression model. The estimate tends to be accurate in most
settings, but will be slightly conservative if predictors are highly
correlated. For an alternative way of estimating the mFDR, typically more
accurate in highly correlated cases, see perm.ncvreg()
.
Value
An object with S3 class mfdr
inheriting from data.frame
, containing:
- 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.
- mFDR
The estimated marginal false discovery rate (
EF/S
).
Author(s)
Patrick Breheny and Ryan Miller
See Also
ncvreg()
, ncvsurv()
, plot.mfdr()
, perm.ncvreg()
Examples
# Linear regression --------------------------------
data(Prostate)
fit <- ncvreg(Prostate$X, Prostate$y)
obj <- mfdr(fit)
obj[1:10,]
# Comparison with perm.ncvreg
op <- par(mfrow=c(2,2))
plot(obj)
plot(obj, type="EF")
pmfit <- perm.ncvreg(Prostate$X, Prostate$y)
plot(pmfit)
plot(pmfit, type="EF")
par(op)
# Logistic regression ------------------------------
data(Heart)
fit <- ncvreg(Heart$X, Heart$y, family="binomial")
obj <- mfdr(fit)
head(obj)
op <- par(mfrow=c(1,2))
plot(obj)
plot(obj, type="EF")
par(op)
# Cox regression -----------------------------------
data(Lung)
fit <- ncvsurv(Lung$X, Lung$y)
obj <- mfdr(fit)
head(obj)
op <- par(mfrow=c(1,2))
plot(obj)
plot(obj, type="EF")
par(op)