Hi.
This is probably a good place to ask if anyone has implemented the new pairwise maximum likelihood estimator for Open Mx? For example, this paper mentions that "PLM fit estimates can also be obtained with Open Mx":
https://doi.org/10.3389/fpsyg.2016.00528
I did not yet find an implementation and the tutorial for making new objective functions seemed a bit intimidating with respect to my current scheduling. It would be great if someone could point us to a ready-made solution. Or confirm that this is relatively rapid to implement using R and math only. This might be critical regarding whether we can estimate as big a model as we wish, or not. WLS, DWLS, etc. does not reliably converge and polychoric correlations lead to serious biases (cannot be remedied by bootstrapping) in our case. Thank you in advance, and thanks for the great software!
Best wishes,
Tom
I'm not sure this is correct and I'd have to read the paper you linked more closely to be sure, but I think the pairwise ML can be obtained from the
mxDataWLS()
function. This function returns anMxData
object, theobserved
slot of which is the pairwise estimated maximum likelihood covariance (or correlation) matrix of the raw data. You could then use this pairwise covariance matrix as the data in some other non-WLS model.Should have specified this, sorry. Pairwise maximum likelihood is otherwise similar to full information maximum likelihood, but instead of integrating over the entire multidimensional latent space within each row-wise computation, it only integrates over pairs of variables and then sums over the pairwise results. That is, it provides computational speed/feasibility (low-dimensional Gaussian integrals) within ML gradient ascent by sacrificing complete (row-wise) multivariate information. Probably it uses the same trick as mxDataWLS(), but directly to compute model-specific ML values instead of an intermediate statistic (covariance matrix). In our case, the models would 'ask' from data much less than an estimate for each and every covariance entry, and therefore a one-step approach to estimation ought to be much more efficient than a two-step approach. Could I somehow use WLS-like raw data computation instead of the pre-computed pairwise covariance matrix?
Apologies for lengthy post. The polychoricMatrix function below does FIML for all variables jointly. It is going to be SLOW with more than say 10 variables at a time. The pairwise approach overcomes the curse of dimensionality, but has other issues of course. There is also a polypairwise function that puts the variables in two-by-two (polyNoah if you will :)). And finally a polytriowise which does it by 3's - so that one might be able to construct a full weight matrix.
Many thanks for the functions. I'll see what I can make out of these later. Looking at the code, it seems to me that this approach is able to provide a pairwise ML estimate for correlations but not for arbitrary SEM models. For the latter, I assume one needs to modify the objective function that is optimized. For example, PML allows that data on all the pairs contribute to a given estimable parameter during model estimation, but data (and the involved integrals for likelihood) on "trios" and higher multidimensional distributions wouldn't.