mxCompare: make comparison optional
Posted on

Attachment | Size |
---|---|
my mxCompare.R | 3.28 KB |
Forums
This is a minor proposal, but I'd like this to work:
> mxCompare2(fit1)
base comparison ep minus2LL df AIC diffLL diffdf p
1 ACE_Non_ScSL_Cor_a
Currently it would error: Comparison model missing.
I attach code that runs which allows the user to access the base function of mxCompare, without having to pad the request with a dummy comparison model. It all still runs fine with multiple bases, 0-n comparisons, and all=T|F. But allows people to see a summary of their model. I don't think there is any other way for users to see this at present.
I wrote it so as not to step on the existing mxCompare() and shoFitStatistics(), by renaming these with a 2 at the end. It calls the private functionality of OpenMx using OpenMx:::
mxCompare(fit)
Log in or register to post comments