You are here

Stage 1: cluster

4 posts / 0 new
Last post
Bfcastilla's picture
Offline
Joined: 09/11/2014 - 09:07
Stage 1: cluster
AttachmentSize
File DATOS1.dat633 bytes
File CLUSTER.dat415 bytes
Plain text icon sintaxisLISREL.txt2 KB
Binary Data Fixed-Cluster.R1.93 KB
Binary Data Fixed-effect(4).R709 bytes

Dear Mike,

I am sorry for bothering you again...but I have another question!

In the document attached (DATOS1.dat) I have six matrices. I did a cluster analysis in order to find some moderators (commands are attached in Fixed-cluster.R), dividing the data in two blocks : the first and second matrices are in one block, and the other four matrices in another. When I execute the first stage, it turned out that the second block (the fourth last matrices) are homogeneous (Chi-square=28.9735, df=26, p=.3123). Until here, everything seems correct.

After that, I tried to carried out a fixed-effect model with only the four matrices (commands are attached in Fixed-effects(4).R) that were homogeneous in the previous analysis (you can find these matrices in CLUSTER.dat). The results from the first stage are not what I expected (Chi-square=60.2163, df=26, p<.01). Now, those four matrices do not seem to be homogeneus as we reject the null hypothesis. Why is this happening? Does it have something to do with the way I encode the missing variables?

And this is not all. I did the same analysis in LISREL (sintaxisLISREL.txt, I could not attach the .cfg file) with the four homogeneous matrices and the chi-square is almost the double (175.387), and the null hyphotesis is also rejected.

I guess that I'm doing some wrong...but I cant find what. Once again, thank you very much for your attention and the time you spend in this forum answering all our doubts!

King Regards,

Belén

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Hi Belén,The error was due

Hi Belén,

The error was due to the following line:
X3<-matrix(data=X111, nrow=5, ncol=5)

It should be:
X3<-matrix(data=X333, nrow=5, ncol=5)

Attached are the output for your reference.

Mike

Bfcastilla's picture
Offline
Joined: 09/11/2014 - 09:07
I can´t believe it was just

I can´t believe it was just that...Sorry for the confusion, It is the problem of copy-pasting the commands!

Thank you very much for the document attached, I did not know that graphs were possible! And sorry for the time you spent solving that silly mistake.

Kind Regards,

Belén.

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Don't worry. Making errors is

Don't worry. Making errors is part of the learning process.

There is a new function to plot models of tssem objects. This release is based on OpenMx 2.0. More information is available at https://github.com/mikewlcheung/metaIntro

Mike