# dr.directions: Directions selected by dimension reduction regressiosn In dr: Methods for Dimension Reduction for Regression

## Description

Dimension reduction regression returns a set of up to p orthogonal direction vectors each of length p, the first d of which are estimates a basis of a d dimensional central subspace. The function returns the estimated directions in the original n dimensional space for plotting.

## Usage

 ```1 2 3 4 5 6 7 8 9``` ```dr.direction(object, which, x) dr.directions(object, which, x) ## Default S3 method: dr.direction(object, which=NULL,x=dr.x(object)) dr.basis(object,numdir) ## S3 method for class 'ire' dr.basis(object,numdir=length(object\$result)) ```

## Arguments

 `object` a dimension reduction regression object created by dr. `which` select the directions wanted, default is all directions. If method is `ire`, then the directions depend on the value of the dimension you select. If omitted, select all directions. `numdir` The number of basis vectors to return `x` select the X matrix, the default is `dr.x(object)`

## Details

Dimension reduction regression is used to estimate a basis of the central subspace or mean central subspace of a regression. If there are p predictors, the dimension of the central subspace is less than or equal to p. These two functions, `dr.basis` and `dr.direction`, return vectors that describe the central subspace in various ways.

Consder `dr.basis` first. If you set `numdir=3`, for example, this method will return a p by 3 matrix whose columns span the estimated three dimensional central subspace. For all methods except for `ire`, this simply returns the first three columns of `object\$evectors`. For the `ire` method, this returns the three vectors determined by a three-dimensional solution. Call this matrix C. The basis is determined by back-transforming from centered and scaled predictors to the scale of the original predictors, and then renormalizing the vectors to have length one. These vectors are orthogonal in the inner product determined by Var(X).

The `dr.direction` method return XC, the same space but now a subspace of the original n-dimensional space. These vectors are appropriate for plotting.

## Value

Both functions return a matrix: for `dr.direction`, the matrix has n rows and numdir columns, and for `dr.basis` it has p rows and numdir columns.

## Author(s)

Sanford Weisberg <sandy@stat.umn.edu>

## References

See R. D. Cook (1998). Regression Graphics. New York: Wiley.

`dr`
 ```1 2 3 4 5 6``` ```data(ais) #fit dimension reduction using sir m1 <- dr(LBM~Wt+Ht+RCC+WCC, method="sir", nslices = 8, data=ais) summary(m1) dr.basis(m1) dr.directions(m1) ```