Learn R Programming

grpreg (version 3.5.0)

summary.cv.grpreg: Summarizing inferences based on cross-validation

Description

Summary method for cv.grpreg or cv.grpsurv objects

Usage

# S3 method for cv.grpreg
summary(object, ...)

# S3 method for summary.cv.grpreg print(x, digits, ...)

Value

summary(cvfit) produces an object with S3 class "summary.cv.grpreg". The class has its own print method and contains the following list elements:

penalty

The penalty used by grpreg/grpsurv.

model

The type of model: "linear", "logistic", "Poisson", "Cox", etc.

n

Number of observations

p

Number of regression coefficients (not including the intercept).

min

The index of lambda with the smallest cross-validation error.

lambda

The sequence of lambda values used by cv.grpreg/cv.grpsurv.

cve

Cross-validation error (deviance).

r.squared

Proportion of variance explained by the model, as estimated by cross-validation.

snr

Signal to noise ratio, as estimated by cross-validation.

sigma

For linear regression models, the scale parameter estimate.

pe

For logistic regression models, the prediction error (misclassification error).

Arguments

object

A "cv.grpreg" object.

...

Further arguments passed to or from other methods.

x

A "summary.cv.grpreg" object.

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.

Author

Patrick Breheny

See Also

grpreg, cv.grpreg, cv.grpsurv, plot.cv.grpreg

Examples

Run this code

# Birthweight data
data(Birthwt)
X <- Birthwt$X
group <- Birthwt$group

# Linear regression
y <- Birthwt$bwt
cvfit <- cv.grpreg(X, y, group)
summary(cvfit)

# Logistic regression
y <- Birthwt$low
cvfit <- cv.grpreg(X, y, group, family="binomial")
summary(cvfit)

# Cox regression
data(Lung)
cvfit <- with(Lung, cv.grpsurv(X, y, group))
summary(cvfit)

Run the code above in your browser using DataLab