Skip to contents

Apply a single-index \(SIR\) on \((X,Y)\) with \(H\) slices. This function allows to obtain an estimate of a basis of the \(EDR\) (Effective Dimension Reduction) space via the eigenvector \(\hat{b}\) associated with the largest nonzero eigenvalue of the matrix of interest \(\widehat{\Sigma}_n^{-1}\widehat{\Gamma}_n\). Thus, \(\hat{b}\) is an \(EDR\) direction.

Usage

SIR(Y, X, H = 10, graph = TRUE, choice = "")

Arguments

Y

A numeric vector representing the dependent variable (a response vector).

X

A matrix representing the quantitative explanatory variables (bind by column).

H

The chosen number of slices (default is 10).

graph

A boolean that must be set to true to display graphics (default is TRUE).

choice

the graph to plot:

  • "eigvals" Plot the eigen values of the matrix of interest.

  • "estim_ind" Plot the estimated index by the SIR model versus Y.

  • "" Plot every graphs. (default)

Value

An object of class SIR, with attributes:

b

This is an estimated EDR direction, which is the principal eigenvector of the interest matrix.

M1

The interest matrix.

eig_val

The eigenvalues of the interest matrix.

n

Sample size.

p

The number of variables in X.

H

The chosen number of slices.

call

Unevaluated call to the function.

index_pred

The index Xb' estimated by SIR.

Y

The response vector.

Examples

# Generate Data
set.seed(10)
n <- 500
beta <- c(1,1,rep(0,8))
X <- mvtnorm::rmvnorm(n,sigma=diag(1,10))
eps <- rnorm(n)
Y <- (X%*%beta)**3+eps

# Apply SIR
SIR(Y, X, H = 10)
#> 
#> Call:
#> SIR(Y = Y, X = X, H = 10)
#> 
#> Results of EDR directions estimation:
#> 
#>     Estimated direction
#> X1             -0.71000
#> X2             -0.69900
#> X3             -0.01830
#> X4              0.03170
#> X5              0.00323
#> X6              0.06760
#> X7              0.01050
#> X8              0.00896
#> X9              0.00403
#> X10            -0.01110
#>