get_best_cvm: Gets the index position for the model with the smallest...

Description Usage Arguments Value Author(s) Examples

View source: R/mcen.r

Description

Gets the index position for the model with the smallest cross-validation error.

Usage

1
get_best_cvm(model)

Arguments

model

The cv.mcen object.

Value

Returns the index for the model with the smallest cross-validation error.

Author(s)

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

Examples

1
2
3
4
5
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)
get_best_cvm(mcen_fit)

mcen documentation built on July 23, 2020, 5:08 p.m.

Related to get_best_cvm in mcen...