Bootstrap SIR
SIR_bootstrap.Rd
Apply a single-index \(SIR\) on \(B\) bootstraped samples of \((X,Y)\) with \(H\) slices.
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).
- B
The number of bootstrapped samples to draw (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_bootstrap, with attributes:
- b
This is an estimated EDR direction, which is the principal eigenvector of the interest matrix.
- mat_b
A matrix of size p*B that contains an estimation of beta in the columns for each bootstrapped sample.
- 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 b'X 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 bootstrap SIR
SIR_bootstrap(Y, X, H = 10, B = 10)
#>
#> Call:
#> SIR_bootstrap(Y = Y, X = X, H = 10, B = 10)
#>
#> Results of EDR directions estimation:
#>
#> Estimated direction
#> X1 0.71000
#> X2 0.70000
#> X3 0.02060
#> X4 -0.03230
#> X5 -0.00665
#> X6 -0.06550
#> X7 -0.02100
#> X8 -0.00582
#> X9 0.00288
#> X10 0.00845
#>