OpenMx runs a Two Factor Model but only returns Zero and NA Values

Attachment | Size |
---|---|
TwoFactorModel.r | 1.42 KB |
TwoFactor_Data.dat | 3.66 KB |
I'm trying to reproduce an analysis of a congeneric two- factor- model from a textbook and I can't figure out where I am going wrong. The model has two latent factors (selfevaluation and foreignevaluation scales) with three indicators each. The output I get looks like this:
> summary(congeneric)
free parameters:
[1] lbound ubound
<0 Zeilen> (oder row.names mit Länge 0)
observed statistics: 0
estimated parameters: 0
degrees of freedom: 0
-2 log likelihood: NA
saturated -2 log likelihood: NA
number of observations: 0
chi-square: NA
p: NA
Information Criteria:
df Penalty Parameters Penalty Sample-Size Adjusted
AIC: NA NA NA
BIC: NA NA NA
CFI: NA
TLI: NA
RMSEA: NA
timestamp: NULL
frontend time: NULL
backend time: NULL
independent submodels time: NULL
wall clock time: NULL
cpu time: NULL
openmx version number: NULL
I have tried all sorts of modifications to my code, but nothing helped. It seems like I must be overlooking something terribly important. I would really appreciate some help! I attached my code and the data.
Jens
You'll laugh when you see this.
summary(congeneric.fit)
You had been trying to get the summary of the unfitted model. :)
summary(congeneric)
Log in or register to post comments
In reply to You'll laugh when you see this. by mhunter
Uuuh... that's embarassing.
Log in or register to post comments
In reply to Uuuh... that's embarassing. by kouros711
I've done it dozens of times,
Log in or register to post comments
In reply to I've done it dozens of times, by Ryne
That makes it a bit better,
Log in or register to post comments
In reply to You'll laugh when you see this. by mhunter
workflow: don't change the model name just because it's fitted
m1 = mxRun(m1)
i.e., don't change the model name just because it's fitted. This makes for far fewer errors, and captures a strength of openMx, which is that a "model is a fit is a model"
I also don't tend to use the
paradigm.
When you're in a workflow, I just use a short generic model name like "m1":
m1 = mxRun(m1)
m2 = mxRun(omxSetParameters(m1, "a1", F,0, name= "dropA"))
m3 = mxRun(omxSetParameters(m2, "a2", F,0, name= "dropA_1_and2"))
mxCompare(m1,c(m2,m3))
otherwise you end up with long statements, and very easily confused words like
greatLongInformativeNameForAModel
greatLongInformativeNameForBModel
Then the informative name is the internal one, which shows up in
.
Your milage may of course vary, I am told.
Log in or register to post comments