mave.dim {MAVE} | R Documentation |
Select best direction using cross-validation
Description
This function selects the dimension of the central (mean) space based on the calculation of MAVE using cross-validation method.
Usage
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
cv0 : the cross-validation value when the null model is used
cv : the cross-validation value using dimension reduction directions of different dimensions
dim.min : the dimension of minimum cross-validation value. Note that this value can be 0.
See Also
mave
for computing the dimension reduction space, predict.mave.dim
for prediction method of mave.dim class
Examples
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)
[Package MAVE version 1.3.11 Index]