Denote the p-variate predictors xi, i = 1, ..., n with corresponding responses yi. The predictors are assumed to follow the model xi = Asi + b, where A is a non-singular p × p matrix, b a p-vector and the random vector s can be decomposed into (s1T, s2T)T with E(s) = 0 and Cov(s) = Ip where s1 has dimension k and s2 dimension p − k. It is then assumed that s1 is the signal part, the interesting components, which are relevant to model y, whereas s2 is the noise part.
The working model assumption is then that (y, s1T)T is independent of s2. Defining S1 = E((x − b)(x − b)T) and S2 = E(E(x − b|y)E(x − b|y)T) the sliced inverse regression (SIR) can be interpreted as finding the transformation matrix W such that WS1WT = Ip and WS2WT = D, where D is a diagonal matrix with diagonal elements d1 ≥ d2 ≥ ... ≥ dk > dk + 1 = ... = dp = 0.
In practice S2 is estimated by approximating E(x − b|y) by dividing y into h slices where in this package y is divided into h intervals containing an equal number of observations.
The practical problem is to decide then the value k.
For an asymptotic test using the test statistic $$ T= n\sum_{i=k+1}^p d_i, $$ the limiting distribution under the null is then T ∼ χ(p − k)(h − k − 1)2. Therefore for the hypothetical value k and the number of slices h is required that k ≥ h − 1.
Bootstrap tests can be constructed as follows
The p-value is then $$ \frac{\#(T_i^* \geq T)+1}{m+1}. $$
Some simulated data with true k = 2:
set.seed(1234)
n <- 200
p <- 10
X <- matrix(rnorm(p*n), ncol = p)
eps <- rnorm(n, sd=0.25)
y <- X[, 1]/ (0.5+(X[, 2]+1.5)^2)
pairs(cbind(y,X))
First performing the asymptotic test
##
## SIR test for subspace dimension
##
## data: X
## T = 65.121, df = 56, p-value = 0.1891
## alternative hypothesis: the last 8 eigenvalues are not zero
Then the bootstrap test
##
## SIR bootstrapping test for subspace dimension
##
## data: X
## T = 0.32561, replications = 200, p-value = 0.209
## alternative hypothesis: the last 8 eigenvalues are not zero
Looking at the first two components and their relationship with the response