The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


analyses:konstantopoulos2011

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
analyses:konstantopoulos2011 [2021/10/20 19:03] Wolfgang Viechtbaueranalyses:konstantopoulos2011 [2022/08/22 16:00] (current) Wolfgang Viechtbauer
Line 21: Line 21:
 </code> </code>
 <code output> <code output>
-   district school study year     yi    vi  +   district school study year     yi    vi 
-1        11      1     1 1976 -0.180 0.118  +1        11      1     1 1976 -0.180 0.118 
-2        11      2     2 1976 -0.220 0.118  +2        11      2     2 1976 -0.220 0.118 
-3        11      3     3 1976  0.230 0.144  +3        11      3     3 1976  0.230 0.144 
-4        11      4     4 1976 -0.300 0.144  +4        11      4     4 1976 -0.300 0.144 
-5        12      1     5 1989  0.130 0.014  +5        12      1     5 1989  0.130 0.014 
-6        12      2     6 1989 -0.260 0.014  +6        12      2     6 1989 -0.260 0.014 
-7        12      3     7 1989  0.190 0.015  +7        12      3     7 1989  0.190 0.015 
-8        12      4     8 1989  0.320 0.024  +8        12      4     8 1989  0.320 0.024 
-9        18      1     9 1994  0.450 0.023  +9        18      1     9 1994  0.450 0.023 
-10       18      2    10 1994  0.380 0.043  +10       18      2    10 1994  0.380 0.043 
-11       18      3    11 1994  0.290 0.012  +11       18      3    11 1994  0.290 0.012 
-12       27      1    12 1976  0.160 0.020  +12       27      1    12 1976  0.160 0.020 
-13       27      2    13 1976  0.650 0.004  +13       27      2    13 1976  0.650 0.004 
-14       27      3    14 1976  0.360 0.004  +14       27      3    14 1976  0.360 0.004 
-15       27      4    15 1976  0.600 0.007 +15       27      4    15 1976  0.600 0.007
 </code> </code>
 So, 4 studies were conducted in district 11, 4 studies in district 12, 3 studies in district 18, and so on. Variables ''yi'' and ''vi'' are the standardized mean differences and corresponding sampling variances. So, 4 studies were conducted in district 11, 4 studies in district 12, 3 studies in district 18, and so on. Variables ''yi'' and ''vi'' are the standardized mean differences and corresponding sampling variances.
Line 47: Line 47:
 </code> </code>
 <code output> <code output>
-1976 1989 1994 1995 1997 2000  +1976 1989 1994 1995 1997 2000 
-  19    4    5    2   15   11 +  19    4    5    2   15   11
 </code> </code>
 The percentage of studies conducted in the various years can be obtained with: The percentage of studies conducted in the various years can be obtained with:
Line 55: Line 55:
 </code> </code>
 <code output> <code output>
-1976 1989 1994 1995 1997 2000 +1976 1989 1994 1995 1997 2000
   34    7    9    4   27   20   34    7    9    4   27   20
 </code> </code>
Line 64: Line 64:
 </code> </code>
 <code output> <code output>
-   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.      SD +   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.      SD
   -0.52   -0.05    0.04    0.12    0.28    1.19    0.33   -0.52   -0.05    0.04    0.12    0.28    1.19    0.33
 </code> </code>
Line 73: Line 73:
 </code> </code>
 <code output> <code output>
- 11  12  18  27  56  58  71  86  91 108 644 + 11  12  18  27  56  58  71  86  91 108 644
   4          11           4   4          11           4
 </code> </code>
Line 80: Line 80:
 To obtain the descriptives about the effect size estimates per district (Table 3 in the paper), we can use: To obtain the descriptives about the effect size estimates per district (Table 3 in the paper), we can use:
 <code rsplus> <code rsplus>
-round(aggregate(yi ~ district, data=dat, FUN=function(x) c(mean=mean(x), sd=sd(x), min=min(x), max=max(x))), 3)+round(aggregate(yi ~ district, data=dat, FUN=function(x)  
 +                c(mean=mean(x), sd=sd(x), min=min(x), max=max(x))), 3)
 </code> </code>
 <code output> <code output>
Line 117: Line 118:
 Model Results: Model Results:
  
-estimate     se   zval   pval  ci.lb  ci.ub  +estimate     se   zval   pval  ci.lb  ci.ub 
-   0.128  0.044  2.916  0.004  0.042  0.214  ** +   0.128  0.044  2.916  0.004  0.042  0.214  **
  
 --- ---
Line 156: Line 157:
 Model Results: Model Results:
  
-                      estimate     se   zval   pval   ci.lb  ci.ub  +                      estimate     se   zval   pval   ci.lb  ci.ub 
-intrcpt                  0.126  0.044  2.859  0.004   0.040  0.212  **  +intrcpt                  0.126  0.044  2.859  0.004   0.040  0.212  ** 
-I(year - mean(year))     0.005  0.004  1.176  0.240  -0.003  0.014     +I(year - mean(year))     0.005  0.004  1.176  0.240  -0.003  0.014
  
 --- ---
Line 175: Line 176:
 Variance Components: Variance Components:
  
-           estim   sqrt  nlvls  fixed  factor  +           estim   sqrt  nlvls  fixed  factor 
-sigma^2    0.088  0.297     56     no   study +sigma^2    0.088  0.297     56     no   study
  
 Test for Heterogeneity: Test for Heterogeneity:
Line 183: Line 184:
 Model Results: Model Results:
  
-estimate     se   zval   pval  ci.lb  ci.ub  +estimate     se   zval   pval  ci.lb  ci.ub 
-   0.128  0.044  2.916  0.004  0.042  0.214  ** +   0.128  0.044  2.916  0.004  0.042  0.214  **
  
 --- ---
Line 203: Line 204:
 Variance Components: Variance Components:
  
-           estim   sqrt  nlvls  fixed          factor  +           estim   sqrt  nlvls  fixed          factor 
-sigma^2.1  0.065  0.255     11     no        district  +sigma^2.1  0.065  0.255     11     no        district 
-sigma^2.2  0.033  0.181     56     no  district/study +sigma^2.2  0.033  0.181     56     no  district/study
  
 Test for Heterogeneity: Test for Heterogeneity:
Line 212: Line 213:
 Model Results: Model Results:
  
-estimate     se   zval   pval  ci.lb  ci.ub  +estimate     se   zval   pval  ci.lb  ci.ub 
-   0.185  0.085  2.185  0.029  0.019  0.350  * +   0.185  0.085  2.185  0.029  0.019  0.350  *
  
 --- ---
Line 268: Line 269:
 Variance Components: Variance Components:
  
-outer factor: district (nlvls = 11)                                                                                   +outer factor: district (nlvls = 11)
 inner factor: study    (nlvls = 56) inner factor: study    (nlvls = 56)
  
-           estim   sqrt  fixed  +           estim   sqrt  fixed 
-tau^2      0.098  0.313     no  +tau^2      0.098  0.313     no 
-rho        0.665            no +rho        0.665            no
  
 Test for Heterogeneity: Test for Heterogeneity:
Line 280: Line 281:
 Model Results: Model Results:
  
-estimate     se   zval   pval  ci.lb  ci.ub  +estimate     se   zval   pval  ci.lb  ci.ub 
-   0.185  0.085  2.185  0.029  0.019  0.350  * +   0.185  0.085  2.185  0.029  0.019  0.350  *
  
 --- ---
Line 288: Line 289:
 The ''random = ~ study | district'' argument adds correlated random effects for the different studies within districts to the model, where the variance-covariance matrix of the random effects takes on a compound symmetric structure (''struct="CS"'' is the default). Note that the estimate of $\rho$ that is obtained is exactly the same as the ICC value we computed earlier based on the multilevel model. Also, the estimate of $\tau^2$ obtained from the multivariate parameterization is the same as the total amount of heterogeneity computed earlier based on the multilevel model. Note that ''random = ~ school | district'' would again yield the same results. The ''random = ~ study | district'' argument adds correlated random effects for the different studies within districts to the model, where the variance-covariance matrix of the random effects takes on a compound symmetric structure (''struct="CS"'' is the default). Note that the estimate of $\rho$ that is obtained is exactly the same as the ICC value we computed earlier based on the multilevel model. Also, the estimate of $\tau^2$ obtained from the multivariate parameterization is the same as the total amount of heterogeneity computed earlier based on the multilevel model. Note that ''random = ~ school | district'' would again yield the same results.
  
-As long as $\rho$ is estimated to be positive, the multilevel and multivariate parametrizations are in essence identical. In fact, the log likelihoods of the two models should be identical, which we can confirm with:+As long as $\rho$ is estimated to be positive, the multilevel and multivariate parameterizations are in essence identical. In fact, the log likelihoods of the two models should be identical, which we can confirm with:
 <code rsplus> <code rsplus>
 logLik(res.ml) logLik(res.ml)
Line 328: Line 329:
 Variance Components: Variance Components:
  
-           estim   sqrt  nlvls  fixed    factor  +           estim   sqrt  nlvls  fixed    factor 
-sigma^2    0.083  0.288     11     no  district +sigma^2    0.083  0.288     11     no  district
  
 Test for Heterogeneity: Test for Heterogeneity:
Line 336: Line 337:
 Model Results: Model Results:
  
-estimate     se   zval   pval  ci.lb  ci.ub  +estimate     se   zval   pval  ci.lb  ci.ub 
-   0.196  0.090  2.179  0.029  0.020  0.372  * +   0.196  0.090  2.179  0.029  0.020  0.372  *
  
 --- ---
Line 356: Line 357:
 Variance Components: Variance Components:
  
-           estim   sqrt  nlvls  fixed    factor  +           estim   sqrt  nlvls  fixed    factor 
-sigma^2.1  0.041  0.203     11     no  district  +sigma^2.1  0.041  0.203     11     no  district 
-sigma^2.2  0.026  0.162     56     no     study +sigma^2.2  0.026  0.162     56     no     study
  
 outer factor: district (nlvls = 11) outer factor: district (nlvls = 11)
 inner factor: study    (nlvls = 56) inner factor: study    (nlvls = 56)
  
-           estim   sqrt  fixed  +           estim   sqrt  fixed 
-tau^2      0.030  0.174     no  +tau^2      0.030  0.174     no 
-rho        0.784            no +rho        0.784            no
  
 Test for Heterogeneity: Test for Heterogeneity:
Line 372: Line 373:
 Model Results: Model Results:
  
-estimate     se   zval   pval  ci.lb  ci.ub  +estimate     se   zval   pval  ci.lb  ci.ub 
-   0.185  0.085  2.185  0.029  0.019  0.350  * +   0.185  0.085  2.185  0.029  0.019  0.350  *
  
 --- ---
analyses/konstantopoulos2011.txt · Last modified: 2022/08/22 16:00 by Wolfgang Viechtbauer