The data matrix (array of rows, NaN for missing values: correlations of pairwise complete observations),
or null with options.covmat. At least 2 variables.
See OmegaOptions.
// 6 items: general loadings 0.6, three pairs with group loadings 0.4
const R = [
[1, 0.52, 0.36, 0.36, 0.36, 0.36],
[0.52, 1, 0.36, 0.36, 0.36, 0.36],
[0.36, 0.36, 1, 0.52, 0.36, 0.36],
[0.36, 0.36, 0.52, 1, 0.36, 0.36],
[0.36, 0.36, 0.36, 0.36, 1, 0.52],
[0.36, 0.36, 0.36, 0.36, 0.52, 1],
];
const om = omega(null, { covmat: R });
om.omegaH; // 0.7297
om.omegaTot; // 0.8378378378378378
McDonald's omega (hierarchical, asymptotic and total) from a Schmid-Leiman transformation of an oblique minres factor solution. Equivalent to
psych::omega()in R. With its defaults (fm = "minres",rotate = "oblimin",option = "equal",flip = TRUE).