metaSEM and control variables

2 replies [Last post]
eberhard's picture
Offline
Joined: 12/20/2013

Dear all,

I use R (2.15.3) with Mike Cheung’s metaSEM package (0.8-4) and thus, OpenMx (1.3.2-2301). I apply Mike Cheung’s tssem1 and tssem2 commands to perform random effects MASEM. My data set is very similar to Becker and Schram (1994), so I will use the Becker and Schram (1994) data set as it is displayed on Mike Cheung’s website (data set) and make one minor adjustment to this data set: I assume that there was an additional variable, namely class size (SIZE). I also assume that the correlation coefficients between class size and the three other variables were available in the original 10 data sets which Becker and Schram (1994) used. This data set would look like this, for example (all class size data are made up):

Becker94test <- structure(list(data = structure(list(
`Becker (1978) Females` = structure(c(1, 0.47, -0.21, 0.12, 0.47, 1, -0.15, -0.05, -0.21, -0.15, 1, 0.47, 0.12, -0.05, 0.47, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Becker (1978) Males` = structure(c(1, 0.28, 0.19, 0.23, 0.28, 1, 0.18, 0.3, 0.19, 0.18, 1, 0.18, 0.23, 0.3, 0.18, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Berry (1957) Females` = structure(c(1, 0.48, 0.41, -0.1, 0.48, 1, 0.26, 0.17, 0.41, 0.26, 1, 0.34, -0.1, 0.17, 0.34, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Berry (1957) Males` = structure(c(1, 0.37, 0.4, 0.05, 0.37, 1, 0.27, 0.45, 0.4, 0.27, 1, -0.23, 0.05, 0.45, -0.23, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Rosenberg (1981) Females` = structure(c(1, 0.42, 0.48, 0.34, 0.42, 1, 0.23, 0.23, 0.48, 0.23, 1, 0.31, 0.34, 0.23, 0.31, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Rosenberg (1981) Males` = structure(c(1, 0.41, 0.74, 0.27, 0.41, 1, 0.44, 0.14, 0.74, 0.44, 1, 0.56, 0.27, 0.14, 0.56, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Weiner A (1984) Females` = structure(c(1, 0.26, 0.72, -0.03, 0.26, 1, 0.36, 0.35, 0.72, 0.36, 1, 0.24, -0.03, 0.35, 0.24, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Weiner A (1984) Males` = structure(c(1, 0.32, 0.52, 0.56, 0.32, 1, 0.1, 0.22, 0.52, 0.1, 1, 0.08, 0.56, 0.22, 0.08, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Weiner B (1984) Females` = structure(c(1, 0.58, 0.64, 0.08, 0.58, 1, 0.4, 0.63, 0.64, 0.4, 1, 0.6, 0.08, 0.63, 0.6, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"))), 
`Weiner B (1984) Males` = structure(c(1, 0.34, 0.28, 0.42, 0.34, 1, -0.03, 0.46, 0.28, -0.03, 1, 0.21, 0.42, 0.46, 0.21, 1), .Dim = c(4L, 4L), .Dimnames = list(c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE"), c("SAT (Math)", "Spatial", "SAT (Verbal)", "SIZE")))),
.Names = c("Becker (1978) Females", "Becker (1978) Males", "Berry (1957) Females", "Berry (1957) Males", "Rosenberg (1981) Females", "Rosenberg (1981) Males", "Weiner A (1984) Females", "Weiner A (1984) Males", "Weiner B (1984) Females", "Weiner B (1984) Males")), 
n = c(74, 153, 48, 55, 51, 18, 27, 43, 35, 34), 
gender = c("Females", "Males", "Females", "Males", "Females", "Males", "Females", "Males", "Females", "Males")), .Names = c("data", "n", "gender"))

The model (based on Cheung, 2013) would look like this (see attachment if not displayed here):

I want to include SIZE as a control variable and treat the variable as follows. Apart from SIZE, everything is similar to (code).

## Stage 1 analysis: A diagonal matrix for random effects
random1 <- tssem1(Becker94test$data, Becker94test$n, method="REM", RE.type="Diag")
summary(random1)
coef(random1)
 
## Prepare models for stage 2 analysis
# A1: asymmetric matrix (regression coefficients)
A1 <- create.mxMatrix(c(0,0,0,0,
                        "0.2*Spatial2Math",0,0,0,
                        "0.2*Verbal2Math",0,0,0,
                        "0.2*SIZE2Math",0,0,0), 
                        type="Full", ncol=4, nrow=4, 
                        name="A1")
A1
 
# S1: symmetric matrix (variance covariance matrix among variables)
S1 <- create.mxMatrix(c("0.2*ErrorVarMath",0,0,0,
                        1,"0.2*CorBetweenSpatialVerbal",0,
                        1,0,
                        1), 
                        type="Symm", name="S1")
S1
 
## Stage 2 analysis (A1, S1)
random2 <- tssem2(random1, Amatrix=A1, Smatrix=S1, diag.constraints=TRUE, intervals="LB")
summary(random2)

Results (please do not concentrate on the values as I made up the SIZE data for explanatory reasons):

> summary(random2)
 
Call:
wls(Cov = pooledS, asyCov = asyCov, n = tssem1.obj$total.n, Amatrix = Amatrix, 
    Smatrix = Smatrix, Fmatrix = Fmatrix, diag.constraints = diag.constraints, 
    cor.analysis = cor.analysis, intervals.type = intervals.type, 
    mx.algebras = mx.algebras, model.name = model.name, suppressWarnings = suppressWarnings)
 
95% confidence intervals: Likelihood-based statistic
Coefficients:
              Estimate Std.Error    lbound    ubound z value Pr(>|z|)
Amatrix[1,2]  0.298619        NA  0.217628  0.377193      NA       NA
Amatrix[1,3]  0.369036        NA  0.207887  0.529343      NA       NA
Amatrix[1,4]  0.117999        NA -0.032000  0.267997      NA       NA
Smatrix[1,1]  0.721916        NA  0.568998  0.831465      NA       NA
Smatrix[2,3]  0.176044        NA  0.080572  0.271520      NA       NA
 
Goodness-of-fit indices:
                                              Value
Sample size                                538.0000
Chi-square of target model                  35.1684
DF of target model                           2.0000
p value of target model                      0.0000
Number of constraints imposed on "Smatrix"   1.0000
DF manually adjusted                         0.0000
Chi-square of independence model           152.0658
DF of independence model                     6.0000
RMSEA                                        0.1757
SRMR                                         0.1796
TLI                                          0.3188
CFI                                          0.7729
AIC                                         31.1684
BIC                                         22.5927
OpenMx status1: 0 ("0" and "1": considered fine; other values indicate problems)

Because I assume that SIZE was used as a control variable in the original studies, I interpret the results of Amatrix[1,4] as regression coefficient from SIZE to Math (similarly to Cheung (2013), Table 2). Am I right to treat SIZE in a similar way as I treat the independent variables Spatial and Verbal for this purpose, although SIZE is a control variable?

Thanks for your help in advance!

Regards, Eberhard

References
Becker BJ, Schram CM. 1994. Examining explanatory models through research synthesis. In The handbook of research synthesis. Cooper H, Hedges L (eds.), Sage: New York, NY.
Cheung MW-L. 2013. Fixed- and random-effects meta-analytic structural equation modeling: Examples and analyses in R. Behavior Research Methods: 1-12.

AttachmentSize
Becker94test.jpg29.89 KB
Mike Cheung's picture
Offline
Joined: 10/08/2009
There is not much difference

There is not much difference between control variables and independent variables. Your interpretations look correct.

However, S1 was specified incorrectly. The df of the "regression model" in summary(random2) is 2. It is because the correlation between SIZE and spatial and between SIZE and verable are fixed at 0.

The independent variables are usually correlated. Attached is the correct S1 for your reference.

AttachmentSize
eberhard.txt 10.81 KB
eberhard's picture
Offline
Joined: 12/20/2013
Mike, thanks again for your

Mike, thanks again for your quick answer which totally makes sense to me! Regards, Eberhard