correct_matrix_mvrr: Multivariate select/correction for covariance matrices

Description Usage Arguments Value References Examples

View source: R/correct_mvrr.R

Description

Correct (or select upon) a covariance matrix using the Pearson-Aitken-Lawley multivariate selection theorem.

Usage

1
2
3
4
5
6
7
8
correct_matrix_mvrr(
  Sigma_i,
  Sigma_xx_a,
  x_col,
  y_col = NULL,
  standardize = FALSE,
  var_names = NULL
)

Arguments

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 Sigma_i that correspond, in order, to the variables in Sigma_xx_a.

y_col

Optional: The variables in Sigma_i not listed in x_col that are to be manipuated by the multivariate range-restriction formula.

standardize

Should the function's output matrix be returned in standardized form (TRUE) or in unstandardized form (FALSE; the default).

var_names

Optional vector of names for the variables in Sigma_i, in order of appearance in the matrix.

Value

A matrix that has been manipulated by the multivariate range-restriction formula.

References

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.

Examples

1
2
3
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)

Example output

-----------------------------------------------------  psychmeta version 2.3.3  --

Please report any bugs to github.com/psychmeta/psychmeta/issues
or issues@psychmeta.com

We work hard to produce these open-source tools for the R community, 
please cite psychmeta when you use it in your research: 
  Dahlke, J. A., & Wiernik, B. M. (2018). psychmeta: An R package for 
     psychometric meta-analysis. Applied Psychological Measurement. 
     Advance online publication. https://doi.org/10.1177/0146621618795933

Find info about psychmeta on the web at psychmeta.com and twitter.com/psychmetaR

Attaching package: 'psychmeta'

The following object is masked from 'package:stats':

    filter

          Var1      Var2      Var3      Var4
Var1 1.0000000 0.5000000 0.3273268 0.3273268
Var2 0.5000000 1.0000000 0.3273268 0.3273268
Var3 0.3273268 0.3273268 1.0000000 0.2857143
Var4 0.3273268 0.3273268 0.2857143 1.0000000

psychmeta documentation built on June 1, 2021, 9:13 a.m.