You are here

How can I compare coefficients within a TSSEM?

4 posts / 0 new
Last post
jode's picture
Offline
Joined: 08/21/2015 - 08:02
How can I compare coefficients within a TSSEM?

Hi metaSEM users, hi Mike,

I enjoy using the metaSEM package for my analysis in R. I amjust wondering how I can compare path cofficients in an estimated model (t-test) ? Probably it is quite easy, but I am new to R. So help is really appreciated :)

Thanks
Johannes

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Hi Johannes, You may use the

Hi Johannes,

You may use the same label if you want to have the same parameter estimates. Then you can compare the models by using the anova() function. For example,

fixed1 <- tssem1(Becker94$data, Becker94$n, method="FEM")
summary(fixed1)

Different regression coefficients

A1 <- create.mxMatrix(c(0,"0.2Spatial2Aptitude","0.2Verbal2Aptitude",
0,0,0,
0,0,0), type="Full",
ncol=3, nrow=3, byrow=TRUE, name="A1")

S1 <- create.mxMatrix(c("0.2ErrorVarAptitude",
0,1,
0,"0.2
CorBetweenSpatialVerbal",1),
type="Symm", byrow=TRUE, name="S1")

fixed2a <- tssem2(fixed1, Amatrix=A1, Smatrix=S1,
model.name="Different regression cofficients")
summary(fixed2a)

Same regression coefficient

A2 <- create.mxMatrix(c(0,"0.2Aptitude","0.2Aptitude",
0,0,0,
0,0,0), type="Full",
ncol=3, nrow=3, byrow=TRUE, name="A1")

fixed2b <- tssem2(fixed1, Amatrix=A2, Smatrix=S1,
model.name="Same regression cofficient")
summary(fixed2b)

Compare these two models with a chi-square difference test

anova(fixed2a, fixed2b)

Mike

jode's picture
Offline
Joined: 08/21/2015 - 08:02
Hi Mike, Thanks for your

Hi Mike,

Thanks for your quick answer. Then I will try the model comparisons. I thought there might be something like the test in MPlus that tests c1 = c2 within a model.

Johannes

jode's picture
Offline
Joined: 08/21/2015 - 08:02
Interestingly, it works but I

Interestingly, it works but I am not really sure with the results.
When I compare the models with the coefficients of .124*** and -.037 (differnt vs. same), they are not significantly different. Can that be?