Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mxPearsonSelCov

Perform Pearson Aitken selection


Description

[Maturing] These functions implement the Pearson Aitken selection formulae.

Usage

mxPearsonSelCov(origCov, newCov)
mxPearsonSelMean(origCov, newCov, origMean)

Arguments

origCov

covariance matrix. The covariance prior to selection.

newCov

covariance matrix. A subset of origCov to replace.

origMean

column vector. A mean vector to adjust.

Details

Which dimensions to condition on can be communicated in one of two ways: (1) newCov is a submatrix of origCov. The dimnames are matched to determine which partition of origCov to replace with newCov. Or (2) newCov is the same dimension as origCov. The matrix entries are inspected to determine which entries have changed. The changed entries determine which partition of origCov to replace with newCov.

Let the n \times n covariance matrix R (origCov) be partitioned into non-empty, disjoint sets p and q. Let R_{ij} denote the covariance matrix between the p and q variables where the subscripts denote the variable subsets (e.g. R_{pq}). Let column vectors μ_p and μ_q contain the means of p and q variables, respectively. We wish to compute the conditional covariances of the variables in q for a subset of the population where R_{pp} and μ_p are known (or partially known)—that is, we wish to condition the covariances and means of q on those of p. Let V_{pp} (newCov) be an arbitrary covariance matrix of the same dimension as R_{pp}. If we replace R_{pp} by V_{pp} then the mean of q (origMean) is transformed as

See PDF version

and the covariance of p and q are transformed as

See PDF version

References

Aitken, A. (1935). Note on selection from a multivariate normal population. Proceedings of the Edinburgh Mathematical Society (Series 2), 4(2), 106-110. doi:10.1017/S0013091500008063

Examples

library(OpenMx)

m1 <- mxModel(
  'selectionTest',
  mxMatrix('Full', 10, 10, values=rWishart(1, 20, toeplitz((10:1)/10))[,,1],
           dimnames=list(paste0('c',1:10),paste0('c',1:10)), name="m1"),
  mxMatrix('Full', 2, 2, values=diag(2),
           dimnames=list(paste0('c',1:2),paste0('c',1:2)), name="m2"),
  mxMatrix('Full', 10, 1, values=runif(10),
           dimnames=list(paste0('c',1:10),c('v')), name="u1"),
  mxAlgebra(mxPearsonSelCov(m1, m2), name="c1"),
  mxAlgebra(mxPearsonSelMean(m1, m2, u1), name="u2")
)

m1 <- mxRun(m1)

OpenMx

Extended Structural Equation Modelling

v2.19.5
Apache License (== 2.0)
Authors
Steven M. Boker [aut], Michael C. Neale [aut], Hermine H. Maes [aut], Michael J. Wilde [ctb], Michael Spiegel [aut], Timothy R. Brick [aut], Ryne Estabrook [aut], Timothy C. Bates [aut], Paras Mehta [ctb], Timo von Oertzen [ctb], Ross J. Gore [aut], Michael D. Hunter [aut], Daniel C. Hackett [ctb], Julian Karch [ctb], Andreas M. Brandmaier [ctb], Joshua N. Pritikin [aut, cre], Mahsa Zahery [aut], Robert M. Kirkpatrick [aut], Yang Wang [ctb], Ben Goodrich [ctb], Charles Driver [ctb], Massachusetts Institute of Technology [cph], S. G. Johnson [cph], Association for Computing Machinery [cph], Dieter Kraft [cph], Stefan Wilhelm [cph], Sarah Medland [cph], Carl F. Falk [cph], Matt Keller [cph], Manjunath B G [cph], The Regents of the University of California [cph], Lester Ingber [cph], Wong Shao Voon [cph], Juan Palacios [cph], Jiang Yang [cph], Gael Guennebaud [cph], Jitse Niesen [cph]
Initial release
2021-03-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.