Using the two scatter matrices approach (SICS) for sliced inversion regression (SIR) the function tests
if the last p-k
components have zero eigenvalues, where p
is the number of explaining variables. Hence the assumption is that the first k
components are relevant for modelling the response y
and the remaining components are not. The function performs bootstrapping to obtain a p-value.
SIRboot(X, y, k, h = 10, n.boot = 200, ...)
a numeric data matrix of explaining variables.
a numeric vector specifying the response.
the number of relevant components under the null hypothesis.
the number of slices used in SIR. Passed on to function covSIR
.
number of bootstrapping samples.
other arguments passed on to covSIR
.
A list of class ictest inheriting from class htest containing:
the value of the test statistic.
the p-value of the test.
the number of boostrapping samples used to compute the p-value.
character string which test was performed.
character string giving the name of the data.
character string specifying the alternative hypothesis.
the number of non-zero eigenvalues used in the testing problem.
the transformation matrix to the underlying components.
data matrix with the centered underlying components.
the underlying eigenvalues.
the location of the data which was substracted before calculating the components.
Under the null hypthesis the last p-k eigenvalue as given in D are zero. The test statistic is then the sum of these eigenvalues.
Denote W as the transformation matrix to the supervised invariant coordinates (SIC) \(s_i\), \(i=1,\ldots,n\), i.e.
$$s_i = W (x_i-MU),$$
where MU
is the location.
Let \(S_1\) be the submatrix of the SICs which are relevant and \(S_2\) the submatrix of the SICs which are irrelevant for the response y under the null.
The boostrapping has then the following steps:
Take a boostrap sample \((y^*, S_1^*)\) of size \(n\) from \((y, S_1)\).
Take a boostrap sample \(S_2^*\) of size \(n\) from \(S_2\).
Combine \(S^*=(S_1^*, S_2^*)\) and create \(X^*= S^* W\).
Compute the test statistic based on \(X^*\).
Repeat the previous steps n.boot
times.
Nordhausen, K., Oja, H. and Tyler, D.E. (2022), Asymptotic and Bootstrap Tests for Subspace Dimension, Journal of Multivariate Analysis, 188, 104830. <doi:10.1016/j.jmva.2021.104830>.
# NOT RUN {
X <- matrix(rnorm(1000), ncol = 5)
eps <- rnorm(200, sd = 0.1)
y <- 2 + 0.5 * X[, 1] + 2 * X[, 3] + eps
SIRboot(X, y, k = 0)
SIRboot(X, y, k = 1)
# }
Run the code above in your browser using DataLab