Attachment | Size |
---|---|
from sem to openmx.R [6] | 3.29 KB |
Hi
Are the algorithms different in the sem package and OpenMx package for solving a sem model? Or the starting values? The question is actually whether one is expected to get the same results from the different packages? (as an aside: how can I obtain the value of the evaluated objective function? after runnnig mxRun?)
I'm asking as I tried to replicate example "Wheaton et al. alienation data " (see ?sem), I think I succeeded in having the same model but coef differ slighty or much...
run attached example and compare:
summary(Run)
name matrix row col Estimate Std.Error
1 A SEI SES 5.2730210 4.0774084
2 A Alienation67 SES -0.6321773 0.5495341
3 A Alienation71 SES -0.2325439 0.5333972
4 A Alienation71 Alienation67 0.6105953 0.4505951
5 the1 S Anomia67 Anomia67 4.1128138 2.3309929
6 the2 S Powerless67 Powerless67 3.1626654 1.6110255
7 S Anomia67 Anomia71 1.5514337 2.2886042
8 S Education Education 2.8734482 4.7788626
9 S SEI SEI 262.9797477 173.9318663
10 S SES SES 6.7365517 6.1315362
11 S Alienation67 Alienation67 5.7430329 3.9999990
12 S Alienation71 Alienation71 4.5054334 3.2001184
summary(sem.wh.1)
Parameter Estimates
Estimate Std Error z value Pr(>|z|)
lamb 5.36880 0.433982 12.3710 0.0000e+00 SEI <--- SES
gam1 -0.62994 0.056128 -11.2233 0.0000e+00 Alienation67 <--- SES
beta 0.59312 0.046820 12.6680 0.0000e+00 Alienation71 <--- Alienation67
gam2 -0.24086 0.055202 -4.3632 1.2817e-05 Alienation71 <--- SES
the1 3.60787 0.200589 17.9864 0.0000e+00 Anomia67 <--> Anomia67
the2 3.59494 0.165234 21.7567 0.0000e+00 Powerless67 <--> Powerless67
the3 2.99366 0.498972 5.9996 1.9774e-09 Education <--> Education
the4 259.57583 18.321121 14.1681 0.0000e+00 SEI <--> SEI
the5 0.90579 0.121710 7.4422 9.9032e-14 Anomia71 <--> Anomia67
psi1 5.67050 0.422906 13.4084 0.0000e+00 Alienation67 <--> Alienation67
psi2 4.51481 0.334993 13.4773 0.0000e+00 Alienation71 <--> Alienation71
phi 6.61632 0.639506 10.3460 0.0000e+00 SES <--> SES
Thanks a lot!!