coef.mave: Directions of CS or CMS of given dimension

Description Usage Arguments Value See Also Examples

View source: R/coef_mave.R

Description

This function returns the basis matrix of CS or CMS of given dimension

Usage

1
2
3
4
5
## S3 method for class 'mave'
coef(object, dim, ...)

## S3 method for class 'mave.dim'
coef(object, dim = "dim.min", ...)

Arguments

object

the output of mave or the output of mave.dim

dim

the dimension of CS or CMS. The value of dim should be given when the class of the argument dr is mave. When the class of the argument dr is mave.dim and dim is not given, the function will return the basis matrix of CS or CMS of dimension selected by mave.dim. Note that the dimension should be > 0.

...

no use.

Value

dir the matrix of CS or CMS of given dimension

See Also

mave.data for obtaining the reduced data

Examples

1
2
3
4
5
6
7
8
x <- matrix(rnorm(400),100,4)
y <- x[,1]+x[,2]+as.matrix(rnorm(100))
dr <- mave(y~x)
dir3 <- coef(dr,3)

dr.dim <- mave.dim(dr)
dir3 <- coef(dr.dim,3)
dir.best <- coef(dr.dim)

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