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

umx_polypairwise

FIML-based Pairwise polychoric, polyserial, and Pearson correlations


Description

Compute polychoric/polyserial/Pearson correlations with FIML in OpenMx

Usage

umx_polypairwise(
  data,
  useDeviations = TRUE,
  printFit = FALSE,
  use = "any",
  tryHard = c("no", "yes", "ordinal", "search")
)

Arguments

data

Dataframe

useDeviations

Whether to code the mode using deviation thresholds (default = TRUE)

printFit

Whether to print information about the fit achieved (default = FALSE)

use

parameter (default = "any")

tryHard

'no' uses normal mxRun (default), "yes" uses mxTryHard, and others used named versions: "mxTryHardOrdinal", "mxTryHardWideSearch"

Value

- matrix of correlations

References

- Barendse, M. T., Ligtvoet, R., Timmerman, M. E., & Oort, F. J. (2016). Model Fit after Pairwise Maximum Likelihood. *Frontiers in psychology*, **7**, 528. doi: 10.3389/fpsyg.2016.00528.

See Also

Examples

umx_set_optimizer("SLSQP")
tmp = mtcars
tmp$am = umxFactor(mtcars$am)
tmp$vs = umxFactor(mtcars$vs)
tmp = umx_scale(tmp)
x = umx_polypairwise(tmp[, c("hp", "mpg", "am", "vs")], tryHard = "yes")
x$R
cov2cor(x$R)
cor(mtcars[, c("hp", "mpg", "am", "vs")])

umx

Structural Equation Modeling and Twin Modeling in R

v4.10.10
GPL-3
Authors
Timothy C. Bates [aut, cre] (<https://orcid.org/0000-0002-1153-9007>), Gillespie Nathan [wit], Michael Zakharin [wit], Brenton Wiernik [ctb], Joshua N. Pritikin [ctb], Michael C. Neale [ctb], Hermine Maes [ctb]
Initial release
2021-11-30

We don't support your browser anymore

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