correct_means_mvrr | R Documentation |
Correct (or select upon) a vector of means using principles from the Pearson-Aitken-Lawley multivariate selection theorem.
correct_means_mvrr( Sigma, means_i = rep(0, ncol(Sigma)), means_x_a, x_col, y_col = NULL, var_names = NULL )
Sigma |
The complete covariance matrix to be used to manipulate means: This matrix may be entirely unrestricted or entirely range restricted, as the regression weights estimated from this matrix are expected to be invariant to the effects of selection. |
means_i |
The complete range-restricted (unrestricted) vector of means to be corrected (selected upon). |
means_x_a |
The vector of unrestricted (range-restricted) means of selection variables |
x_col |
The row/column indices of the variables in |
y_col |
Optional: The variables in |
var_names |
Optional vector of names for the variables in |
A vector of means 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 <- diag(.5, 4) Sigma[lower.tri(Sigma)] <- c(.2, .3, .4, .3, .4, .4) Sigma <- Sigma + t(Sigma) diag(Sigma) <- 1 correct_means_mvrr(Sigma = Sigma, means_i = c(.3, .3, .1, .1), means_x_a = c(-.1, -.1), x_col = 1:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.