View source: R/summary-ncvreg.R
summary.ncvreg | R Documentation |
Inferential summaries for ncvreg
and ncvsurv
objects based on local marginal false discovery rates.
## S3 method for class 'ncvreg'
summary(object, lambda, which, number, cutoff, sort = TRUE, sigma, ...)
## S3 method for class 'summary.ncvreg'
print(x, digits, ...)
object |
An |
lambda |
The regularization parameter value at which inference should be reported. |
which |
Alternatively, |
number |
By default, |
cutoff |
Alternatively, specifying for example |
sort |
Should the results be sorted by |
sigma |
For linear regression models, users can supply an estimate of the residual standard deviation. The default is to use RSS / DF, where degrees of freedom are approximated using the number of nonzero coefficients. |
... |
Further arguments; in particular, if you have set |
x |
A |
digits |
Number of digits past the decimal point to print out. Can be a vector specifying different display digits for each of the five non-integer printed values. |
An object with S3 class summary.ncvreg
. The class has its own
print method and contains the following list elements:
penalty |
The penalty used by |
model |
Either |
n |
Number of instances. |
p |
Number of regression coefficients (not including the intercept). |
lambda |
The |
nvars |
The number of nonzero coefficients (again, not including the intercept) at that value of |
table |
A table containing estimates, normalized test statistics (z), and an estimate of the local mfdr for each coefficient. The mfdr may be loosely interpreted, in an empirical Bayes sense, as the probability that the given feature is null. |
unpen.table |
If there are any unpenalized coefficients, a separate inferential summary is given for them. Currently, this is based on |
Patrick Breheny patrick-breheny@uiowa.edu
ncvreg()
, cv.ncvreg()
, plot.cv.ncvreg()
, local_mfdr()
# Linear regression --------------------------------------------------
data(Prostate)
fit <- ncvreg(Prostate$X, Prostate$y)
summary(fit, lambda=0.08)
# Logistic regression ------------------------------------------------
data(Heart)
fit <- ncvreg(Heart$X, Heart$y, family="binomial")
summary(fit, lambda=0.05)
# Cox regression -----------------------------------------------------
data(Lung)
fit <- ncvsurv(Lung$X, Lung$y)
summary(fit, lambda=0.1)
# Options ------------------------------------------------------------
fit <- ncvreg(Heart$X, Heart$y, family="binomial")
summary(fit, lambda=0.08, number=3)
summary(fit, lambda=0.08, number=Inf)
summary(fit, lambda=0.08, cutoff=0.5)
summary(fit, lambda=0.08, number=3, cutoff=0.5)
summary(fit, lambda=0.08, number=5, cutoff=0.1)
summary(fit, lambda=0.08, number=Inf, sort=FALSE)
summary(fit, lambda=0.08, number=3, cutoff=0.5, sort=FALSE)
# If X and y are not returned with the fit, they must be supplied
fit <- ncvreg(Heart$X, Heart$y, family="binomial", returnX=FALSE)
summary(fit, X=Heart$X, y=Heart$y, lambda=0.08)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.