access model estimated parameters (EP) without calling summary?

Posted on
Picture of user. tbates Joined: 07/31/2009
Hi OpenMxers,
I want to determine automatically which order to put models into mxCompare so that the model with more degrees of freedom comes first.

Both models have been run, and I can access a models number of estimated parameters from summary(model).

summary() however, can be costly in terms of execution time: Is there a way to access the EP (or df) property from the model directly without calling summary?

Besten Wünsche,
tim

FYI, the situation I am trying to automate is avoiding this:

|Model        | EP|Delta-2LL |Delta df|p  |      AIC|Compare with Model |
|:------------|--:|:----------|:------|:--|--------:|:------------------|
|fix_C_2_zero | 25|           |       |   | 2227.444|                   |
|Final        | 27|1.29e-05   |-2     |   | 2231.444|fix_C_2_zero       |
Warning message:
In pchisq(otherSummary$Minus2LogLikelihood - refSummary$Minus2LogLikelihood,  :
  NaNs produced
Replied on Fri, 11/27/2015 - 08:56
Picture of user. mhunter Joined: 07/31/2009

The S3 method called coef() is a wrapper around omxGetParameters. It extracts the free parameters without using summary(). You could then do length(coef(model1)).