mave.dim: Select best direction using cross-validation

Description Usage Arguments Value See Also Examples

View source: R/MAVE_CV.R

Description

This function selects the dimension of the central (mean) space based on the calculation of MAVE using cross-validation method.

Usage

1
mave.dim(dr, max.dim = 10)

Arguments

dr

the result of MAVE function

max.dim

the maximum dimension for cross-validation.

Value

dr.dim contains all information in dr plus cross-validation values of corresponding direction

See Also

mave for computing the dimension reduction space, predict.mave.dim for prediction method of mave.dim class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 x <- matrix(rnorm(400*5),400,5)
 b1 <- matrix(c(1,1,0,0,0),5,1)
 b2 <- matrix(c(0,0,1,1,0),5,1)
 eps <- matrix(rnorm(400),400,1)
 y <- x%*%b1 + (x%*%b2)*eps

 #seleted dimension of central space
 dr.cs <- mave(y~x,method='csmave')
 dr.cs.dim <- mave.dim(dr.cs)

 #seleted dimension of central mean space
 dr.mean <- mave(y~x,method='meanmave')
 dr.mean.dim <- mave.dim(dr.mean)

MAVE documentation built on March 3, 2021, 1:12 a.m.