how to specify in the middle between stage1 and stage2

Offline
Joined: 11/11/2013

Dear Dr mike :
I have a question about MASEM. My example is to study the effect of social support on depression.I found four variables : subject support (zz), objective support (kz) , the using of support (zl), depression (yy). Among these , zz, kz, zl were loaded under a higher-order factor ,called "Alpha", that represents social support. The following is my R code :

a<-c(1,0.428,0.41,-0.327,0.428,1,0.292,-0.199,0.41,0.292,1,-0.198,-0.327,-0.199,-0.198,1)
m1<-matrix(a,nrow=4,ncol=4,dimnames=list(rowname,colname))
rowname=c("zz","kz","zl","yy")
rowname
colname=c("zz","kz","zl","yy")
colname
m1
b<-c(1,0.482,0.239,-0.183,0.482,1,0.305,-0.229,0.239,0.305,1,-0.256,-0.183,-0.229,-0.256,1)
m2<-matrix(a,nrow=4,ncol=4,dimnames=list(rowname,colname))
rowname=c("zz","kz","zl","yy")
rowname
colname=c("zz","kz","zl","yy")
colname
m2
c<-c(1,0.474,0.360,-0.044,0.474,1,0.42,-0.113,0.360,0.42,1,-0.185,-0.044,-0.113,-0.185,1)
m3<-matrix(c,nrow=4,ncol=4,dimnames=list(rowname,colname))
rowname=c("zz","kz","zl","yy")
rowname
colname=c("zz","kz","zl","yy")
colname
m3
d<-c(1,0.330,0.294,-0.246,0.330,1,0.261,-0.264,0.294,0.261,1,-0.217,-0.246,-0.264,-0.217,1)
m4<-matrix(d,nrow=4,ncol=4,dimnames=list(rowname,colname))
rowname=c("zz","kz","zl","yy")
rowname
colname=c("zz","kz","zl","yy")
colname
m4
e<-c(1,0.25,0.24,-0.21,0.25,1,0.15,-0.19,0.24,0.15,1,-0.23,-0.21,-0.19,-0.23,1)
m5<-matrix(e,nrow=4,ncol=4,dimnames=list(rowname,colname))
rowname=c("zz","kz","zl","yy")
rowname
colname=c("zz","kz","zl","yy")
colname
m5
l1<-list(m1,m2,m3,m4,m5)
l2<-list(A=m1,B=m2,C=m3,D=m4,E=m5)
names(l2)
l2
n<-c(211,123,459,698,310)
n
#### Load the metaSEM library for TSSEM
library(metaSEM)
#### Inspect the data for inspection
#### Fixed-effects model: Stage 1 analysis
fixed1 <- tssem1(my.df=l2, n=n, method="FEM")
summary(fixed1)
coef(fixed1)

I didn't know how to specify, so I could't go on . I look forward to reading your responses. Thank you!
regards,
xiarizhiyue0727

Offline
Joined: 10/08/2009
Hi xiarizhiyue, The Stage 2

Hi xiarizhiyue,

The Stage 2 specification uses the RAM specification (McArdle & McDonald, 1984) that is also used by OpenMx.

There are several examples in OpenMx:
http://dbtemp.blogspot.sg/2011/08/structural-equation-modeling-in-openmx...
http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Examples_Matrix.html

In metaSEM, there are several examples in the help manual. You may refer to the "See Also" section in the help of tssem1(). There are also examples in the following paper: https://dl.dropboxusercontent.com/u/25182759/Fixed%20and%20random%20effe...
http://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/masem.html
http://courses.nus.edu.sg/course/psycwlm/internet/metaSEM/metasem.pdf

McArdle, J. J., & McDonald, R. P. (1984). Some algebraic properties of the Reticular Action Model for moment structures. British Journal of Mathematical and Statistical Psychology, 37(2), 234–251. doi:10.1111/j.2044-8317.1984.tb00802.x

Hope it helps.

Regards,
Mike