You are here

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

6 posts / 0 new
Last post
kouros711's picture
Offline
Joined: 02/11/2013 - 13:54
OpenMx runs a Two Factor Model but only returns Zero and NA Values

Hi,

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
(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

AttachmentSize
Binary Data TwoFactorModel.r1.42 KB
File TwoFactor_Data.dat3.66 KB
mhunter's picture
Offline
Joined: 07/31/2009 - 15:26
You'll laugh when you see this.

You'll laugh when you see this. Try

summary(congeneric.fit)

You had been trying to get the summary of the unfitted model. :)

summary(congeneric)

kouros711's picture
Offline
Joined: 02/11/2013 - 13:54
Uuuh... that's embarassing.

Uuuh... that's embarassing. Well, thank you for your help!

Ryne's picture
Offline
Joined: 07/31/2009 - 15:12
I've done it dozens of times,

I've done it dozens of times, as has everyone else on the development team. Welcome, you're one of us!

kouros711's picture
Offline
Joined: 02/11/2013 - 13:54
That makes it a bit better,

That makes it a bit better, that it happened to you, too:-) Thanks for the warm welcome and for this forum!

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
workflow: don't change the model name just because it's fitted

For this reason I always do

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

greatLongInformativeNameForAModel

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

mxCompare

.

Your milage may of course vary, I am told.

Log in or register to post comments