Returns the slicing matrix required for the "SIR-I" method.
1 |
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. |
details |
A boolean that determines whether or not some matrices used to construct the slicing matrix should be sent back. See also 'Value'. |
rdSup |
When the number of slices is not a divisor of the sample size, this boolean determines whether or not the slices which contain an extra point are randomly chosen. |
This function divides the range of Y in H distinct intervals, or slices. It then puts every row of X into a slice with respect to the corresponding element of Y. It finally computes a matrix M = X_h' P_h X_h where each row of X_h is the mean vector over the vectors of X that belong to a given slice. The matrix P_h is diagonal and contains the number of rows of X placed in each sliced. The matrix M is required when trying to perform a sliced inverse regression.
If details=FALSE
, the p x p slicing matrix M, where p is the number of columns of X.
If details=TRUE
, a list made of M, X_h and P_h.
Raphaël Coudret <rcoudret@gmail.com>, Benoît Liquet <benoit.liquet@isped.u-bordeaux2.fr> and Jérôme Saracco <jerome.saracco@math.u-bordeaux1.fr>
edr
, edrUnderdet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.