mave: Dimension reduction

Description Usage Arguments Value References See Also Examples

View source: R/MAVE.R

Description

This function provides several methods to estimate the central space or central mean space of y on x. It returns the matrix of central space or central mean space for different dimensions and contains other information used for dimension selection by mave.dim.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
mave(
  formula,
  data,
  method = "CSOPG",
  max.dim = 10,
  screen = NULL,
  subset,
  na.action = na.fail
)

mave.compute(
  x,
  y,
  method = "CSOPG",
  max.dim = 10,
  screen = nrow(x)/log(nrow(x))
)

Arguments

formula

the model used in regression

data

the data

method

This parameter specify which method will be used in dimension reduction. It provides five methods, including "csMAVE","csOPG","meanOPG","meanMAVE","KSIR" by default, method = 'csOPG'

  • 'meanOPG' and 'meanMAVE' estimate dimension reduction space for conditional mean

  • 'csMAVE' and 'csOPG' estimate the central dimension reduction space

  • 'KSIR' is a kernel version of sliced inverse regression (Li, 1991). It is fast, but with poor accuracy.

max.dim

the maximum dimension of dimension reduction space. The default is 10. In practice, max.dim will be equal to min(max.dim,ncol(x),screen).

screen

specify the number of variables retained after screening method. The default is n/log(n). When this number is smaller than max.dim, then max.dim will change to the value of screen

subset

an optional vector specifying a subset of observations to be used in the fitting process.

na.action

a function which indicates what should happen when the data contain NAs. The default is na.action, which wil stop calculations. If na.action is set to be na.omit, the incomplete cases will be removed.

x

The n by p design matrix.

y

The n by q respond matrix.

Value

dr is a list which contains:

References

Li K C. Sliced inverse regression for dimension reduction[J]. Journal of the American Statistical Association, 1991, 86(414): 316-327.

Xia Y, Tong H, Li W K, et al. An adaptive estimation of dimension reduction space[J]. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 2002, 64(3): 363-410.

Xia Y. A constructive approach to the estimation of dimension reduction directions[J]. The Annals of Statistics, 2007: 2654-2690.

Wang H, Xia Y. Sliced regression for dimension reduction[J]. Journal of the American Statistical Association, 2008, 103(482): 811-821.

See Also

mave.dim for dimension selection, predict.mave for prediction using the dimension reduction space, coef.mave for accessing the basis vectors of dimension reduction space of given dimension, plot.mave for plot method for mave class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 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

 #finding central space based on OPG method
 #dr.csopg <- mave.compute(x,y, method = 'csopg')
 #or
 dr.csopg <- mave(y ~ x, method = 'csopg')

 #dr.meanopg <- mave.compute(x,y, method = 'meanopg')
 #or
 dr.meanopg <- mave(y ~ x, method = 'meanopg')

 #find central mean space based on ksir method
 dr.ksir <- mave(y~x,method='ksir')
 #or
 #dr.ksir <- mave.compute(x,y,method='ksir')

 #See more examples about screening and mutiple responses in the vignette
 #Using screening for high dimensional data
 #x <- matrix(rnorm(100*50),100,50)
 #y1 = as.matrix(x[,1])+rnorm(100)*.2
 #y2 = as.matrix(x[,2]+x[,3])*as.matrix(x[,1]+x[,5])+rnorm(100)*.2
 #y = cbind(y1,y2)
 #dr.sc = mave(y~x,method='CSOPG',max.dim=5,screen=20)
 #dr.sc.dim = mave.dim(dr.sc)
 #print the directions of central space with the selected variables
 #dr.sc.dim$dir[[3]][dr.sc$idx,]

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