mfdr | R Documentation |
Estimates the marginal false discovery rate (mFDR) of a penalized regression model.
mfdr(fit, X)
fit |
An |
X |
The model matrix corresponding to |
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()
.
An object with S3 class mfdr
inheriting from data.frame
, containing:
The number of variables selected at each value of lambda
, averaged over the permutation fits.
The actual number of selected variables for the non-permuted data.
The estimated marginal false discovery rate (EF/S
).
Patrick Breheny and Ryan Miller
ncvreg()
, ncvsurv()
, plot.mfdr()
, perm.ncvreg()
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.