coef.cv.DMR {DMRnet}R Documentation

coef.cv.DMR

Description

Extracts coefficients from a cv.DMR object (for the model with minimal cross-validated error /the default/ or the smallest model falling under the upper curve of a prediction error plus one standard deviation).

Usage

## S3 method for class 'cv.DMR'
coef(object, md = "df.min", ...)

Arguments

object

Fitted cv.DMR object.

md

Value of the model dimension parameter at which predictions are required. The default is md="df.min" value indicating the model minimizing the cross validation error. Alternatively, md="df.1se" can be used, indicating the smallest model falling under the upper curve of a prediction error plus one standard deviation.

...

Further arguments passed to or from other methods.

Details

Similar to other coef methods, this function extracts coefficients from a fitted cv.DMR object.

Value

Vector of coefficients.

Examples

## cv.DMR for linear regression
set.seed(13)
data(miete)
y <- miete$rent
X <- miete$area
cv = cv.DMR(X,y)
coef(cv)


[Package DMRnet version 0.4.0 Index]