How can I compare coefficients within a TSSEM?

Posted on
No user picture. jode Joined: 08/21/2015
Forums

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

Replied on Fri, 08/21/2015 - 21:42
Picture of user. Mike Cheung Joined: Oct 08, 2009

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.2*Spatial2Aptitude","0.2*Verbal2Aptitude",
0,0,0,
0,0,0), type="Full",
ncol=3, nrow=3, byrow=TRUE, name="A1")

S1 <- create.mxMatrix(c("0.2*ErrorVarAptitude",
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.2*Aptitude","0.2*Aptitude",
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

Replied on Sun, 08/23/2015 - 11:30
No user picture. jode Joined: Aug 21, 2015

In reply to by jode

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?