correct_matrix_mvrr | R Documentation |
Correct (or select upon) a covariance matrix using the Pearson-Aitken-Lawley multivariate selection theorem.
correct_matrix_mvrr( Sigma_i, Sigma_xx_a, x_col, y_col = NULL, standardize = FALSE, var_names = NULL )
Sigma_i |
The complete range-restricted (unrestricted) covariance matrix to be corrected (selected upon). |
Sigma_xx_a |
The matrix of unrestricted (range-restricted) covariances among of selection variables. |
x_col |
The row/column indices of the variables in |
y_col |
Optional: The variables in |
standardize |
Should the function's output matrix be returned in standardized form ( |
var_names |
Optional vector of names for the variables in |
A matrix that has been manipulated by the multivariate range-restriction formula.
Aitken, A. C. (1934). Note on selection from a multivariate normal population. Proceedings of the Edinburgh Mathematical Society (Series 2), 4(2), 106–110.
Lawley, D. N. (1943). A note on Karl Pearson’s selection formulae. Proceedings of the Royal Society of Edinburgh. Section A. Mathematical and Physical Sciences, 62(1), 28–30.
Sigma_i <- reshape_vec2mat(cov = .2, var = .8, order = 4) Sigma_xx_a <- reshape_vec2mat(cov = .5, order = 2) correct_matrix_mvrr(Sigma_i = Sigma_i, Sigma_xx_a = Sigma_xx_a, x_col = 1:2, standardize = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.