Computes single predictor categorical moderator analysis under a fixed or random effects model.
Usage
macat(g, var, mod, data, method= "random")
Arguments
g
Hedges g (unbiased estimate of d) effect size.
var
Vaiance of g.
mod
Categorical moderator variable used for moderator analysis.
method
Default is random. For fixed effects, use fixed.
data
data.frame with values above.
Details
See Konstantopoulos & Hedges (2009; pp. 280-288) for the computations used in this function.
Value
mod
Level of the categorical moderator.
k
Number of studies for each level of the moderator.
estimate
Mean effect size of each level of the moderator.
ci.l
Lower 95% confidence interval.
ci.u
Upper 95% confidence interval.
z
z-score (standardized value).
p
Significance level.
var
Variance of effect size.
se
Square root of variance.
Q
Q-statistic (measure of homogeneity).
df
Degrees of freedom for Q-statistic.
p.h
p-value for homogeneity within that level of the moderator.
I2
Proportion of total variation in effect size that is due to heterogeneity rather than chance (see Shadish & Haddock, 2009; pp. 263).
Q
Q-statistic overall. Note: Whether fixed or random effects analyses are conducted, the Q statistic reported is for the fixed effect model. Therefore, Qb + Qw != Q in the random effects output.
Qw
Q-within (or error). Measure of within-group heterogeneity.
Qw.df
Degrees of freedom for Q-within.
Qw.p
Q-within p-value (for homogeneity).
Qb
Q-between (or model). Measure of model fit.
Qb.df
Degrees of freedom for Q-between.
Qb.p
Q-between p-value (for homogeneity). Qb and Qb.p provide the test of whether the moderator variable(s) account for significant variance among effect sizes.
Konstantopoulos & Hedges (2009). Analyzing effect sizes: Fixed-effects models. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta analysis (pp. 279-293). New York: Russell Sage Foundation.
Shadish & Haddock (2009). Analyzing effect sizes: Fixed-effects models. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta analysis (pp. 257-278). New York: Russell Sage Foundation.
See Also
plotcat,
wd
Examples
id<-c(1:20)
n.1<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20)
n.2 <- c(11,22,10,20,25,12,12,36,19,11,34,75,33,120,37,14,40,16,10,21)
g <- c(.68,.56,.23,.64,.49,-.04,1.49,1.33,.58,1.18,-.11,1.27,.26,.40,.49,
.51,.40,.34,.42,1.16)
var.g <- c(.08,.06,.03,.04,.09,.04,.009,.033,.0058,.018,.011,.027,.026,.0040,
.049,.0051,.040,.034,.0042,.016)
mod<-factor(c(rep(c(1,1,2,3),5)))
df<-data.frame(id, n.1,n.2, g, var.g,mod)
# Example
# Random effects
macat(g = g, var= var.g, mod = mod, data = df, method= "random")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MAd)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MAd/macat.rd_%03d_medium.png", width=480, height=480)
> ### Name: macat
> ### Title: Categorical Moderator Analysis
> ### Aliases: macat
> ### Keywords: models
>
> ### ** Examples
>
> id<-c(1:20)
> n.1<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20)
> n.2 <- c(11,22,10,20,25,12,12,36,19,11,34,75,33,120,37,14,40,16,10,21)
> g <- c(.68,.56,.23,.64,.49,-.04,1.49,1.33,.58,1.18,-.11,1.27,.26,.40,.49,
+ .51,.40,.34,.42,1.16)
> var.g <- c(.08,.06,.03,.04,.09,.04,.009,.033,.0058,.018,.011,.027,.026,.0040,
+ .049,.0051,.040,.034,.0042,.016)
> mod<-factor(c(rep(c(1,1,2,3),5)))
> df<-data.frame(id, n.1,n.2, g, var.g,mod)
>
> # Example
>
> # Random effects
> macat(g = g, var= var.g, mod = mod, data = df, method= "random")
Model Results:
mod k estimate var se ci.l ci.u z p Q df p.h I2
1 1 10 0.487 0.024 0.155 0.183 0.790 3.143 0.002 40.267 9 0 78%
2 2 5 0.510 0.045 0.211 0.097 0.924 2.419 0.016 145.283 4 0 97%
3 3 5 0.976 0.045 0.213 0.559 1.393 4.583 0.000 41.856 4 0 90%
4 Overall 20 0.618 0.012 0.108 0.407 0.829 5.739 0.000 246.723 19 0 92%
Heterogeneity:
Q Qw Qw.df Qw.p Qb Qb.df Qb.p
1 246.723 227.405 17 0 3.802 2 0.149
>
>
>
>
>
> dev.off()
null device
1
>