SIR_threshold {SIRthresholded} | R Documentation |
SIR threshold
Description
Apply a single-index SIR
on (X,Y)
with H
slices, with a parameter \lambda
which
apply a soft/hard thresholding to the interest matrix \widehat{\Sigma}_n^{-1}\widehat{\Gamma}_n
.
Usage
SIR_threshold(
Y,
X,
H = 10,
lambda = 0,
thresholding = "hard",
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). |
lambda |
The thresholding parameter (default is 0). |
thresholding |
The thresholding method to choose between hard and soft (default is hard). |
graph |
A boolean that must be set to true to display graphics (default is TRUE). |
choice |
the graph to plot:
|
Value
An object of class SIR_threshold, with attributes:
b |
This is an estimated EDR direction, which is the principal eigenvector of the interest matrix. |
M1 |
The interest matrix thresholded. |
eig_val |
The eigenvalues of the interest matrix thresholded. |
eig_vect |
A matrix corresponding to the eigenvectors of the interest matrix. |
Y |
The response vector. |
n |
Sample size. |
p |
The number of variables in X. |
H |
The chosen number of slices. |
nb.zeros |
The number of 0 in the estimation of the vector beta. |
index_pred |
The index Xb' estimated by SIR. |
list.relevant.variables |
A list that contains the variables selected by the model. |
cos_squared |
The cosine squared between vanilla SIR and SIR thresholded. |
lambda |
The thresholding parameter used. |
thresholding |
The thresholding method used. |
call |
Unevaluated call to the function. |
X_reduced |
The X data restricted to the variables selected by the model. It can be used to estimate a new SIR model on the relevant variables to improve the estimation of b. |
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 with hard thresholding
SIR_threshold(Y, X, H = 10, lambda = 0.2, thresholding = "hard")