coef.cv.mcen {mcen}R Documentation

Returns the coefficients from the cv.mcen object with the smallest cross-validation error.

Description

Returns the coefficients from the cv.mcen object with the smallest cross-validation error.

Usage

## S3 method for class 'cv.mcen'
coef(object, ...)

Arguments

object

The cv.mcen object.

...

Additional values to be passed.

Value

The matrix of coefficients for the best MCEN model as determined by cross-validation.

Author(s)

Ben Sherwood <ben.sherwood@ku.edu>, Brad Price <brad.price@mail.wvu.edu>

Examples


x <- matrix(rnorm(400),ncol=4)
beta <- beta <- matrix(c(1,1,0,0,0,0,-1,-1,0,0,-1,-1,1,1,0,0),ncol=4)
y <- x%*%beta + rnorm(400) 
mcen_fit <- cv.mcen(x,y,ky=2,gamma_y=3)
best_coef <- coefficients(mcen_fit)


[Package mcen version 1.2.1 Index]