Title: | Meta-Analysis with Mean Differences |
---|---|
Description: | A collection of functions for conducting a meta-analysis with mean differences data. It uses recommended procedures as described in The Handbook of Research Synthesis and Meta-Analysis (Cooper, Hedges, & Valentine, 2009). |
Authors: | AC Del Re [aut, cre] , William Hoyt [aut] |
Maintainer: | AC Del Re <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.8-3 |
Built: | 2024-11-01 11:26:56 UTC |
Source: | https://github.com/cran/MAd |
The Mad package contains a variety of functions for conducting a mean differences meta-analysis using recommended procedures as described in The Handbook of Research Synthesis and Meta-Analysis (Cooper, Hedges, and Valentine, 2009). The goal in creating this package was to provide user-friendly functions to assist researchers in the process of conducting a meta-analysis, from the initial to final stages of their analytic endeavor. The meta-analyst can begin their project by using MAd
functions to derive d (standardized mean differences) and g (unbiased d) from a variety of statistics/values reported in the primary studies (e.g., raw means and sd, t-test). Then, the analyst can aggregate all within-study effect sizes (while accounting for within-study correlations among outcome measures and eliminating any dependencies in the dataset), calculate omnibus effect sizes under a fixed and random effects model, and assess for significant moderators (categorical and continuous, single and multi-predictor models) in the dataset. Finally, the meta-analyst can use one of several user-friendly graphics functions to visually represent their data.
Package: | MAd |
Type: | Package |
Version: | 0.8-2 |
Date: | 2014-12-23 |
License: | GPL-2 |
LazyLoad: | yes |
The MAd
package has integrated functions to facilitate the meta-analytic process at nearly every analytical stage. There are five broad areas of analysis that the MAd
package targets:
1. Computations to Calculate Mean Differences:
There are a variety of functions to compute d (standardized mean difference) and g (unbiased d) from various designs reported in the primary studies. Most functions were derived from Borenstein's chapter in The Handbook of Research Synthesis and Meta-Analysis (Cooper, Hedges, & Valentine, 2009; pp. 228-234). For additional conversion formulas see the compute.es package: https://CRAN.R-project.org/package=compute.es
2. Within-Study Aggregation of Effect Sizes:
This fuction will simultaneously aggregate all within-study effect sizes while taking into account the correlations among the within-study outcome measures (Gleser & Olkin 2009; Gleser & Olkin 2009; Hedges & Olkin, 1985; Rosenthal et al., 2006). The default imputed correlation between within-study effect sizes is set at .50 (Wampold et al., 1997) and will compute an aggregated effect size for each study. This default of .50 is adjustable and can vary between outcome types. This MAd
aggregation function implements Gleser & Olkin (1994; 2009) and Borenstein et al. (2009) procedures for aggregating dependent effect sizes. To our knowledge, this is the first statistical package/program to explicitly utilize and automate this type of aggregation procedure, which has a dual effect of saving the researcher substantial time while improving the accuracy of their analyses.
3. Fixed and Random Effects Omnibus Analysis:
This package contains all the relevant functions to calculate fixed and random effects omnibus effect sizes, outputting the omnibus (i.e., overall) effect size, variance, standard error, upper and lower confidence intervals, and the Q-statistic (heterogeneity test).
4. Moderator Analyses:
There are user-friendly functions to compute fixed and random effects moderator analyses. These include single and multiple predictor models for both categorical and continuous moderator data.
5. Graphics:
This package has a variety of functions visually representing data. This includes boxplots and meta-regression scatterplots.
6. Sample of Additional Functions:
Export MA output to nicely formatted Word tables.
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
Cooper, H., Hedges, L.V., & Valentine, J.C. (2009). The handbook of research synthesis and meta-analysis (2nd edition). New York: Russell Sage Foundation.
Gleser & Olkin (1994). Stochastically dependent effect sizes. In H. Cooper, & L. V. Hedges, & J. C.(Eds.), The handbook of research synthesis (pp. 339-356). New York: Russell Sage Foundation.
Gleser & Olkin (2009). Stochastically dependent effect sizes. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta analysis (pp. 357-376). New York: Russell Sage Foundation.
Viechtbauer, W (2010). metafor: Meta-Analysis Package for R. R package version 1.1-0. https://CRAN.R-project.org/package=metafor
Wampold, B. E., Mondin, G. W., Moody, M., Stich, F., Benson, K., & Ahn, H. (1997). A meta-analysis of outcome studies comparing bona fide psychotherapies: Empiricially, 'all must have prizes.' Psychological Bulletin, 122(3), 203-215.
compute.es package: https://CRAN.R-project.org/package=compute.es;
metafor package: https://CRAN.R-project.org/package=metafor
## EXAMPLES FOR EACH BROAD AREA # SAMPLE DATA: MA <- data.frame(id=factor(rep(1:5, 3)), measure=c(rep("dep",5), rep("anx",5), rep("shy",5)), es=c(rnorm(5, 0.8, .2), rnorm(5, 0.5, .1), rnorm(5, 0.4, .1)), var.es=abs(rnorm(5*3,0.05, .03)), nT=round(rnorm(5*3, 30, 5),0), nC=round(rnorm(5*3, 30, 5),0), mod1=factor(rep(c("a","b","c","d","e"),3)), mod2=rep(seq(20, 60, 10), 3)) # 1. COMPUTE MEAN DIFFERENCE STATISTIC FROM # REPORTED STATS (GENERALLY FROM A PRIMARY STUDY): # suppose the primary study reported an log odds ratio for different # proportions between 2 groups. Then, running: lor_to_d(.9070,.0676) # reported log odds ratio (lor = .9070) and variance (.0676) will output the # standardized mean difference (d) and its variance (var.d) that can be used in # a meta-analysis. ## 2. ACCOUNT FOR DEPENDENCIES: WITHIN-STUDY EFFECT SIZES (ES): ## 2 EXAMPLES: # EXAMPLE 1: AGGREGATING EFFECT SIZES FOR A DATA FRAME # (MULTIPLE STUDIES AT LEAST SOME OF WHICH HAVE MULTIPLE DEPENDENT EFFECT SIZES) # EXAMPLE 2: AGGREGATING EFFECT SIZES FOR SINGLE STUDY WITH THREE OR MORE # EFFECT SIZES WHEN PAIRS OF DVS HAVE DIFFERENT CORRELATIONS ## EXAMPLE 1: MA IS A DATA FRAME CONTAINING MULTIPLE STUDIES (id), ## EACH WITH MULTIPLE EFFECT SIZES (CORRELATIONS BETWEEN ALL PAIRS OF DVS ARE r=.5.) # AGGREGATION PROCEDURE: # method="GO1"; GLESER AND OLKIN (1994) PROCEDURE WHEN d IS COMPUTED # USING POOLED SD IN THE DENOMINATOR MA1 <- agg(id=id, es=es, var=var.es, n.1=nT, n.2=nC, cor = .5, method="GO1", data=MA) MA1 ## EXAMPLE 2: STUDY 1 COMPARES A TREATMENT AND CONTROL GROUP ON ## THREE OUTCOME MEASURES (DEPRESSION, ANXIETY, and SHYNESS). # THE CORRELATION AMONG THE THREE PAIRS OF DVS ARE r12=.5, r13=.2, and r23=.3. study1 <- data.frame( id=factor(rep(1, 3)), measure=c("dep", "anx", "shy"), es=c(0.8, 0.5, 0.4), var.es=c(0.01, 0.02, 0.1), nT=rep(30, 3), nC=rep(30, 3)) # ONE WOULD CONSTRUCT THE CORRELATION MATRIX AS FOLLOWS: cors <- matrix(c(1,.5,.2, .5,1,.3, .2,.3,1), nrow=3) # AGGREGATION PROCEDURE: # method="GO1"; GLESER AND OLKIN (1994) PROCEDURE WHEN d # IS COMPUTED USING POOLED SD IN THE DENOMINATOR agg(id=id, es=es, var=var.es, n.1=nT, n.2=nC, cor=cors, method="GO1", mod = NULL, data=study1) # where MA = data.frame with columns for id, es (standardized # mean difference), var.es (variance of es), n.1 (sample size of group # one), and n.2 (sample size of comparison group) with multiple rows per # study. Outputs an aggregated data.frame with 1 effect size per study. ## 3.OMNIBUS ANALYSIS # FIRST ADD MODERATORS TO THE AGGREGATED DATASET: MODS <- data.frame(id=1:5, mod1=factor(c("a","b","a","b","b")), mod2=as.numeric(c(20, 30, 25, 35, 40))) MA2 <- merge(MA1, MODS, by='id') # Random Effects m0 <- mareg(es1~ 1, var = var1, method = "REML", data = MA2) # where MA = data.frame with columns for id, es (standardized # mean difference), var.es (variance of es), n.1 (sample size of group # one), and n.2 (sample size of comparison group). # view output: summary(m0) # 4. MODERATOR ANALYSIS: # Random Effects m1 <- mareg(es1~ mod1 + mod2 , var = var1, method = "REML", data = MA2) # view output: summary(m1) # 5. Graphics: ## Not run: plotcon(g = es1, var = var1, mod = mod1, data = MA2, method= "random", modname= "Moderator") ## End(Not run) # Additional Functions # Export MA output to nicely formatted Word tables. # install R2wd # install.packages('R2wd', dependencies = TRUE) # Export data to Word in formatted table # wd(m1, get = TRUE, new = TRUE)
## EXAMPLES FOR EACH BROAD AREA # SAMPLE DATA: MA <- data.frame(id=factor(rep(1:5, 3)), measure=c(rep("dep",5), rep("anx",5), rep("shy",5)), es=c(rnorm(5, 0.8, .2), rnorm(5, 0.5, .1), rnorm(5, 0.4, .1)), var.es=abs(rnorm(5*3,0.05, .03)), nT=round(rnorm(5*3, 30, 5),0), nC=round(rnorm(5*3, 30, 5),0), mod1=factor(rep(c("a","b","c","d","e"),3)), mod2=rep(seq(20, 60, 10), 3)) # 1. COMPUTE MEAN DIFFERENCE STATISTIC FROM # REPORTED STATS (GENERALLY FROM A PRIMARY STUDY): # suppose the primary study reported an log odds ratio for different # proportions between 2 groups. Then, running: lor_to_d(.9070,.0676) # reported log odds ratio (lor = .9070) and variance (.0676) will output the # standardized mean difference (d) and its variance (var.d) that can be used in # a meta-analysis. ## 2. ACCOUNT FOR DEPENDENCIES: WITHIN-STUDY EFFECT SIZES (ES): ## 2 EXAMPLES: # EXAMPLE 1: AGGREGATING EFFECT SIZES FOR A DATA FRAME # (MULTIPLE STUDIES AT LEAST SOME OF WHICH HAVE MULTIPLE DEPENDENT EFFECT SIZES) # EXAMPLE 2: AGGREGATING EFFECT SIZES FOR SINGLE STUDY WITH THREE OR MORE # EFFECT SIZES WHEN PAIRS OF DVS HAVE DIFFERENT CORRELATIONS ## EXAMPLE 1: MA IS A DATA FRAME CONTAINING MULTIPLE STUDIES (id), ## EACH WITH MULTIPLE EFFECT SIZES (CORRELATIONS BETWEEN ALL PAIRS OF DVS ARE r=.5.) # AGGREGATION PROCEDURE: # method="GO1"; GLESER AND OLKIN (1994) PROCEDURE WHEN d IS COMPUTED # USING POOLED SD IN THE DENOMINATOR MA1 <- agg(id=id, es=es, var=var.es, n.1=nT, n.2=nC, cor = .5, method="GO1", data=MA) MA1 ## EXAMPLE 2: STUDY 1 COMPARES A TREATMENT AND CONTROL GROUP ON ## THREE OUTCOME MEASURES (DEPRESSION, ANXIETY, and SHYNESS). # THE CORRELATION AMONG THE THREE PAIRS OF DVS ARE r12=.5, r13=.2, and r23=.3. study1 <- data.frame( id=factor(rep(1, 3)), measure=c("dep", "anx", "shy"), es=c(0.8, 0.5, 0.4), var.es=c(0.01, 0.02, 0.1), nT=rep(30, 3), nC=rep(30, 3)) # ONE WOULD CONSTRUCT THE CORRELATION MATRIX AS FOLLOWS: cors <- matrix(c(1,.5,.2, .5,1,.3, .2,.3,1), nrow=3) # AGGREGATION PROCEDURE: # method="GO1"; GLESER AND OLKIN (1994) PROCEDURE WHEN d # IS COMPUTED USING POOLED SD IN THE DENOMINATOR agg(id=id, es=es, var=var.es, n.1=nT, n.2=nC, cor=cors, method="GO1", mod = NULL, data=study1) # where MA = data.frame with columns for id, es (standardized # mean difference), var.es (variance of es), n.1 (sample size of group # one), and n.2 (sample size of comparison group) with multiple rows per # study. Outputs an aggregated data.frame with 1 effect size per study. ## 3.OMNIBUS ANALYSIS # FIRST ADD MODERATORS TO THE AGGREGATED DATASET: MODS <- data.frame(id=1:5, mod1=factor(c("a","b","a","b","b")), mod2=as.numeric(c(20, 30, 25, 35, 40))) MA2 <- merge(MA1, MODS, by='id') # Random Effects m0 <- mareg(es1~ 1, var = var1, method = "REML", data = MA2) # where MA = data.frame with columns for id, es (standardized # mean difference), var.es (variance of es), n.1 (sample size of group # one), and n.2 (sample size of comparison group). # view output: summary(m0) # 4. MODERATOR ANALYSIS: # Random Effects m1 <- mareg(es1~ mod1 + mod2 , var = var1, method = "REML", data = MA2) # view output: summary(m1) # 5. Graphics: ## Not run: plotcon(g = es1, var = var1, mod = mod1, data = MA2, method= "random", modname= "Moderator") ## End(Not run) # Additional Functions # Export MA output to nicely formatted Word tables. # install R2wd # install.packages('R2wd', dependencies = TRUE) # Export data to Word in formatted table # wd(m1, get = TRUE, new = TRUE)
This function will simultaneously aggregate all within-study effect sizes while taking into account the correlations among the within-study outcomes. The default correlation between outcome measures is set at .50 (Wampold et al., 1997), and can be adjusted as needed. An aggregate effect size and its variance is computed for each study. This MAd
aggregation function implements Gleser & Olkin (1994) and Borenstein et al. (2009) procedures for aggregating dependent effect sizes..
agg(id, es, var, n.1=NULL, n.2=NULL, method = "BHHR", cor = .50, mod=NULL, data)
agg(id, es, var, n.1=NULL, n.2=NULL, method = "BHHR", cor = .50, mod=NULL, data)
id |
Study id with multiple rows of same id. |
es |
Effect size. Use Cohen's d for GO1 and GO2 method and use Hedges g for BHHR method. |
var |
Variance of g. |
n.1 |
Sample size of group one. Only required if using method='GO1' or 'GO2'. |
n.2 |
Sample size of group two. Only required if using method='GO1' or 'GO2'. |
method |
'BHHR'= Borenstein, et al. (2009) procedure.'GO1'= Gleser and Olkin (1994) procedure using pooled standard deviation (SD). 'GO2'= Gleser and Olkin (1994) procedure using group 2 SD (typically control group SD). Default is 'BHHR'. |
cor |
Estimated correlation among within-study outcome variables. Input should either be a fixed correlation (default is r=.5) or a correlation matrix to allow different correlations between outcome types (in which case aggregation should typically be on one study at a time rather than the entire dataset–see examples below). |
mod |
To aggregate by id and one moderator. If there are multiple levels of a categorical moderator within study and one can in derive seperate effect size estimates for each level within and between studies. Default is NULL. |
data |
|
Outputs a data.frame
with aggregated effect sizes and variances of effect sizes where each study is reduced to one row per study (unless aggregated by a moderator) by a weighted average formula.
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
Cooper, H., Hedges, L.V., & Valentine, J.C. (2009). The handbook of research synthesis and meta-analysis (2nd edition). New York: Russell Sage Foundation.
Gleser & Olkin (1994). Stochastically dependent effect sizes. In H. Cooper, & L. V. Hedges, & J. C.(Eds.), The handbook of research synthesis(pp. 339-356). New York: Russell Sage Foundation.
Gleser & Olkin (2009). Stochastically dependent effect sizes. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta analysis (pp. 357-377). 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.
## 2 EXAMPLES: # EXAMPLE 1: Aggregating effect sizes for a data frame # (multiple studies at least some of which have multiple # effect sizes), assuming equal correlations (r=.5) between # pairs of DVs. # EXAMPLE 2: Aggregating effect sizes for a single study # with 3 or more effect sizes when pairs of DVs have # different correlations. # LOAD DATA (EXAMPLE DATA FROM HOYT & DEL RE, 2015 SIMULATION): data(dat.hoyt) ## EXAMPLE 1: dat.hoyt is a data frame with multiple studies identified ## by variable 'id'. Each study has multiple effect sizes based on ## multiple DVs. Correlations between all pairs of DVs are r=.5. # NOTE: Based on a simulation study by Hoyt & Del Re (2015), it is # recommended that methods "G01" and "G02" (Gleser and Olkin) # should aggregate Cohen's d, without using Hedges & Olkin's # recommended bias correction. (Studies providing only a single # effect size should still be corrected for bias, after aggregation.) # Method "BHHR" should aggregate Hedges' g, after bias correction. # Option 1: method="BHHR"; Borenstein et al. (2009) procedure. # Use with Hedges' g; can also be used with any other effect # size (e.g., z', LOR). agg(id=id, es=g, var=vg, cor=.5, method="BHHR", mod=NULL, data=dat.hoyt) # Option 2: method="GO1"; Gleser & Olkin (1994) procedure when # d is computed using pooled sd in denominator. agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = .5, method="GO1", mod = NULL, data=dat.hoyt) # Option 3: method="GO2"; Gleser & Olkin (1994) procedure when # d is computed using sd.2 (typically control group sd) # in denominator agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = .5, method="GO2", mod = NULL, data=dat.hoyt) ## EXAMPLE 2: Single study comparing T and C group ## on three DVs: depression, anxiety, and shyness ## r12=.5; r13=.2; r23=.3 data <- dat.hoyt[20:22,] # Step 1: Create the correlation matrix, based on r12, r13, and r23: cors <- matrix(c(1,.5,.2, .5,1,.3, .2,.3,1), nrow=3) # Step 2: Aggregate using agg() function. # Option 1: method="BHHR"; Borenstein et al. (2009) procedure. # Use with Hedges' g; can also be used with any other effect # size (e.g., z', LOR). agg(id=id, es=g, var=vg, cor=cors, method="BHHR", mod=NULL, data=data) # Option 2: method="GO1"; Gleser & Olkin (1994) procedure when # d is computed using pooled sd in denominator. agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = cors, method="GO1", mod = NULL, data=data) # Option 3: method="GO2"; Gleser & Olkin (1994) procedure when # d is computed using sd.2 (typically control group sd) # in denominator agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = cors, method="GO2", mod = NULL, data=data) ## Citation ## # Hoyt, W. T., & Del Re, A. C. (2013). Comparison of methods for # aggregating dependent effect sizes in meta-analysis. # Manuscript submitted for publication.
## 2 EXAMPLES: # EXAMPLE 1: Aggregating effect sizes for a data frame # (multiple studies at least some of which have multiple # effect sizes), assuming equal correlations (r=.5) between # pairs of DVs. # EXAMPLE 2: Aggregating effect sizes for a single study # with 3 or more effect sizes when pairs of DVs have # different correlations. # LOAD DATA (EXAMPLE DATA FROM HOYT & DEL RE, 2015 SIMULATION): data(dat.hoyt) ## EXAMPLE 1: dat.hoyt is a data frame with multiple studies identified ## by variable 'id'. Each study has multiple effect sizes based on ## multiple DVs. Correlations between all pairs of DVs are r=.5. # NOTE: Based on a simulation study by Hoyt & Del Re (2015), it is # recommended that methods "G01" and "G02" (Gleser and Olkin) # should aggregate Cohen's d, without using Hedges & Olkin's # recommended bias correction. (Studies providing only a single # effect size should still be corrected for bias, after aggregation.) # Method "BHHR" should aggregate Hedges' g, after bias correction. # Option 1: method="BHHR"; Borenstein et al. (2009) procedure. # Use with Hedges' g; can also be used with any other effect # size (e.g., z', LOR). agg(id=id, es=g, var=vg, cor=.5, method="BHHR", mod=NULL, data=dat.hoyt) # Option 2: method="GO1"; Gleser & Olkin (1994) procedure when # d is computed using pooled sd in denominator. agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = .5, method="GO1", mod = NULL, data=dat.hoyt) # Option 3: method="GO2"; Gleser & Olkin (1994) procedure when # d is computed using sd.2 (typically control group sd) # in denominator agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = .5, method="GO2", mod = NULL, data=dat.hoyt) ## EXAMPLE 2: Single study comparing T and C group ## on three DVs: depression, anxiety, and shyness ## r12=.5; r13=.2; r23=.3 data <- dat.hoyt[20:22,] # Step 1: Create the correlation matrix, based on r12, r13, and r23: cors <- matrix(c(1,.5,.2, .5,1,.3, .2,.3,1), nrow=3) # Step 2: Aggregate using agg() function. # Option 1: method="BHHR"; Borenstein et al. (2009) procedure. # Use with Hedges' g; can also be used with any other effect # size (e.g., z', LOR). agg(id=id, es=g, var=vg, cor=cors, method="BHHR", mod=NULL, data=data) # Option 2: method="GO1"; Gleser & Olkin (1994) procedure when # d is computed using pooled sd in denominator. agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = cors, method="GO1", mod = NULL, data=data) # Option 3: method="GO2"; Gleser & Olkin (1994) procedure when # d is computed using sd.2 (typically control group sd) # in denominator agg(id=id, es=d, var=vd, n.1=n.T, n.2=n.C, cor = cors, method="GO2", mod = NULL, data=data) ## Citation ## # Hoyt, W. T., & Del Re, A. C. (2013). Comparison of methods for # aggregating dependent effect sizes in meta-analysis. # Manuscript submitted for publication.
Converts an ANCOVA F-statistic to d (standardized mean difference)
ancova_to_d1(m.1.adj, m.2.adj, sd.adj, n.1, n.2, R, q)
ancova_to_d1(m.1.adj, m.2.adj, sd.adj, n.1, n.2, R, q)
m.1.adj |
Adjusted mean of treatment group from ANCOVA. |
m.2.adj |
Adjusted mean of comparison group from ANCOVA. |
sd.adj |
Adjusted standard deviation. |
n.1 |
Treatment group sample size. |
n.2 |
Comparison group sample size. |
R |
Covariate outcome correlation or multiple correlation. |
q |
Number of covariates. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts an ANCOVA F-statistic with pooled standard deviation to d (standardized mean difference)
ancova_to_d2(m.1.adj, m.2.adj, s.pooled, n.1, n.2, R, q)
ancova_to_d2(m.1.adj, m.2.adj, s.pooled, n.1, n.2, R, q)
m.1.adj |
Adjusted mean of treatment group from ANCOVA. |
m.2.adj |
Adjusted mean of comparison group from ANCOVA. |
s.pooled |
Pooled standard deviation. |
n.1 |
Treatment group sample size. |
n.2 |
Comparison group sample size. |
R |
Covariate outcome correlation or multiple correlation. |
q |
number of covariates. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Used to correct for attenuated effect sizes due to measurement unreliability.
atten(g, xx, yy, data)
atten(g, xx, yy, data)
g |
Hedges g (unbiased estimate of d) effect size. |
xx |
Column for reliability of predictor variable ("independent variable"). |
yy |
Column for reliability of outcome variable ("dependent variable"). |
data |
|
A new column for g corrected for attenuation (g.corrected
) will be added to the data, for those xx & yy columns with complete data.
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Hunter, J. E., Schmidt, F. L. (2004). Methods of meta-analysis (2nd edition). Thousand Oaks, CA: Sage.
# Sample data: id<-c(1, 1:19) n<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20) g<-c(.68,.56,.23,.64,.49,-.04,.49,.33,.58,.18,-.11,.27,.26,.40,.49, .51,.40,.34,.42,.16) var.g <- c(.08,.06,.03,.04,.09,.04,.009,.033,.0058,.018,.011,.027,.026,.0040, .049,.0051,.040,.034,.0042,.016) xx<-c(.88,.86,.83,.64,.89,.84,.89,.83,.99,.88,.81,.77,.86,.70,.79, .71,.80,.74,.82,.86) # Reliability of "independent variable" yy<-c(.99,.86,.83,.94,.89,.94,.89,.93,.99,.88,.81,.77,.86,.70,.79, .71,.80,.94,.92,.96) # Reliability of "dependent variable" df<-data.frame(id,n,g, var.g, xx,yy) # Example atten(g= g, xx = xx, yy = yy, data= df)
# Sample data: id<-c(1, 1:19) n<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20) g<-c(.68,.56,.23,.64,.49,-.04,.49,.33,.58,.18,-.11,.27,.26,.40,.49, .51,.40,.34,.42,.16) var.g <- c(.08,.06,.03,.04,.09,.04,.009,.033,.0058,.018,.011,.027,.026,.0040, .049,.0051,.040,.034,.0042,.016) xx<-c(.88,.86,.83,.64,.89,.84,.89,.83,.99,.88,.81,.77,.86,.70,.79, .71,.80,.74,.82,.86) # Reliability of "independent variable" yy<-c(.99,.86,.83,.94,.89,.94,.89,.93,.99,.88,.81,.77,.86,.70,.79, .71,.80,.94,.92,.96) # Reliability of "dependent variable" df<-data.frame(id,n,g, var.g, xx,yy) # Example atten(g= g, xx = xx, yy = yy, data= df)
Adds d & g (standardized mean difference) to a data.frame
. Required inputs are: n.1 (sample size of group one), m.1 (raw post-mean value of group one), sd.1 (standard deviation of group one), n.2 (sample size of group two), m.2 (raw post-mean value of group two), sd.2 (standard deviation of group two).
compute_dgs(n.1, m.1, sd.1 , n.2, m.2, sd.2, data, denom = "pooled.sd")
compute_dgs(n.1, m.1, sd.1 , n.2, m.2, sd.2, data, denom = "pooled.sd")
n.1 |
sample size of group one. |
m.1 |
raw post-mean value of group one. |
sd.1 |
standard deviation of group one. |
n.2 |
sample size of group two. |
m.2 |
raw post-mean value of group two. |
sd.2 |
standard deviation of group two. |
data |
|
denom |
Value in the denominator to standardize the means by. |
d |
Standardized mean difference. |
var.d |
Variance of d. |
se.d |
Standard error of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
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) m.1 <- c(.68,.56,.23,.64,.49,.4,1.49,.53,.58,1.18,.11,1.27,.26,.40,.49, .51,.40,.34,.42,.66) m.2 <- c(.38,.36,.23,.34,.29,.4,1.9,.33,.28,1.1,.111,.27,.21,.140,.149, .51,.140,.134,.42,.16) sd.1 <- c(.28,.26,.23,.44,.49,.34,.39,.33,.58,.38,.31,.27,.26,.40, .49,.51,.140,.134,.42,.46) sd.2 <- c(.28,.26,.23,.44,.49,.44,.39,.33,.58,.38,.51,.27,.26,.40, .49,.51,.140,.134,.142,.36) mod1 <- c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1) mod2 <- factor(c(rep(c(1,2,3,4),5))) dfs <- data.frame(id, n.1,m.1, sd.1, n.2, m.2, sd.2, mod1, mod2) # Example compute_dgs(n.1, m.1, sd.1, n.2, m.2, sd.2, data = dfs)
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) m.1 <- c(.68,.56,.23,.64,.49,.4,1.49,.53,.58,1.18,.11,1.27,.26,.40,.49, .51,.40,.34,.42,.66) m.2 <- c(.38,.36,.23,.34,.29,.4,1.9,.33,.28,1.1,.111,.27,.21,.140,.149, .51,.140,.134,.42,.16) sd.1 <- c(.28,.26,.23,.44,.49,.34,.39,.33,.58,.38,.31,.27,.26,.40, .49,.51,.140,.134,.42,.46) sd.2 <- c(.28,.26,.23,.44,.49,.44,.39,.33,.58,.38,.51,.27,.26,.40, .49,.51,.140,.134,.142,.36) mod1 <- c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1) mod2 <- factor(c(rep(c(1,2,3,4),5))) dfs <- data.frame(id, n.1,m.1, sd.1, n.2, m.2, sd.2, mod1, mod2) # Example compute_dgs(n.1, m.1, sd.1, n.2, m.2, sd.2, data = dfs)
Adds d (standardized mean difference) to a data.frame
. Required inputs are: n.1 (sample size of group one), m.1 (raw post-mean value of group one), sd.1 (standard deviation of group one), n.2 (sample size of group two), m.2 (raw post-mean value of group two), sd.2 (standard deviation of group two).
compute_ds(n.1, m.1, sd.1 , n.2, m.2, sd.2 , data, denom = "pooled.sd")
compute_ds(n.1, m.1, sd.1 , n.2, m.2, sd.2 , data, denom = "pooled.sd")
n.1 |
sample size of group one. |
m.1 |
raw post-mean value of group one. |
sd.1 |
standard deviation of group one. |
n.2 |
sample size of group two. |
m.2 |
raw post-mean value of group two. |
sd.2 |
standard deviation of group two. |
data |
|
denom |
Value in the denominator to standardize the means by. |
d |
Standardized mean difference. |
var.d |
Variance of d. |
se.d |
Standard error of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
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) m.1 <- c(.68,.56,.23,.64,.49,.4,1.49,.53,.58,1.18,.11,1.27,.26,.40,.49, .51,.40,.34,.42,.66) m.2 <- c(.38,.36,.23,.34,.29,.4,1.9,.33,.28,1.1,.111,.27,.21,.140,.149, .51,.140,.134,.42,.16) sd.1 <- c(.28,.26,.23,.44,.49,.34,.39,.33,.58,.38,.31,.27,.26,.40, .49,.51,.140,.134,.42,.46) sd.2 <- c(.28,.26,.23,.44,.49,.44,.39,.33,.58,.38,.51,.27,.26,.40, .49,.51,.140,.134,.142,.36) mod1 <- c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1) mod2 <- factor(c(rep(c(1,2,3,4),5))) dfs <- data.frame(id, n.1,m.1, sd.1, n.2, m.2, sd.2, mod1, mod2) # Example compute_ds(n.1, m.1, sd.1, n.2, m.2, sd.2, data = dfs)
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) m.1 <- c(.68,.56,.23,.64,.49,.4,1.49,.53,.58,1.18,.11,1.27,.26,.40,.49, .51,.40,.34,.42,.66) m.2 <- c(.38,.36,.23,.34,.29,.4,1.9,.33,.28,1.1,.111,.27,.21,.140,.149, .51,.140,.134,.42,.16) sd.1 <- c(.28,.26,.23,.44,.49,.34,.39,.33,.58,.38,.31,.27,.26,.40, .49,.51,.140,.134,.42,.46) sd.2 <- c(.28,.26,.23,.44,.49,.44,.39,.33,.58,.38,.51,.27,.26,.40, .49,.51,.140,.134,.142,.36) mod1 <- c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1) mod2 <- factor(c(rep(c(1,2,3,4),5))) dfs <- data.frame(id, n.1,m.1, sd.1, n.2, m.2, sd.2, mod1, mod2) # Example compute_ds(n.1, m.1, sd.1, n.2, m.2, sd.2, data = dfs)
Adds g (unbiassed standardized mean difference) to a data.frame
. Required inputs are: n.1 (sample size of group one), sd.1 (standard deviation of group one), n.2 (sample size of group two).
compute_gs(d , var.d , n.1, n.2, data)
compute_gs(d , var.d , n.1, n.2, data)
d |
Standardized mean difference (biased). |
var.d |
Variance of d. |
n.1 |
sample size of group one. |
n.2 |
sample size of group two. |
data |
|
g |
Unbiased standardized mean difference. |
var.g |
Variance of g. |
se.g |
Standard error of g. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
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) m.1 <- c(.68,.56,.23,.64,.49,.4,1.49,.53,.58,1.18,.11,1.27,.26,.40,.49, .51,.40,.34,.42,.66) m.2 <- c(.38,.36,.23,.34,.29,.4,1.9,.33,.28,1.1,.111,.27,.21,.140,.149, .51,.140,.134,.42,.16) sd.1 <- c(.28,.26,.23,.44,.49,.34,.39,.33,.58,.38,.31,.27,.26,.40, .49,.51,.140,.134,.42,.46) sd.2 <- c(.28,.26,.23,.44,.49,.44,.39,.33,.58,.38,.51,.27,.26,.40, .49,.51,.140,.134,.142,.36) mod1 <- c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1) mod2 <- factor(c(rep(c(1,2,3,4),5))) dfs <- data.frame(id, n.1,m.1, sd.1, n.2, m.2, sd.2, mod1, mod2) # Example # first compute d dfs2 <- compute_ds(n.1, m.1, sd.1, n.2, m.2, sd.2, data = dfs) # now, compute g compute_gs(d, var.d, n.1, n.2, dfs2)
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) m.1 <- c(.68,.56,.23,.64,.49,.4,1.49,.53,.58,1.18,.11,1.27,.26,.40,.49, .51,.40,.34,.42,.66) m.2 <- c(.38,.36,.23,.34,.29,.4,1.9,.33,.28,1.1,.111,.27,.21,.140,.149, .51,.140,.134,.42,.16) sd.1 <- c(.28,.26,.23,.44,.49,.34,.39,.33,.58,.38,.31,.27,.26,.40, .49,.51,.140,.134,.42,.46) sd.2 <- c(.28,.26,.23,.44,.49,.44,.39,.33,.58,.38,.51,.27,.26,.40, .49,.51,.140,.134,.142,.36) mod1 <- c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1) mod2 <- factor(c(rep(c(1,2,3,4),5))) dfs <- data.frame(id, n.1,m.1, sd.1, n.2, m.2, sd.2, mod1, mod2) # Example # first compute d dfs2 <- compute_ds(n.1, m.1, sd.1, n.2, m.2, sd.2, data = dfs) # now, compute g compute_gs(d, var.d, n.1, n.2, dfs2)
Eliminates the small upward bias of d to provide an unbiased estimate of the population effect size parameter (g). This procedure will compute g for a single value of d.
d_to_g(d, var.d, n.1, n.2)
d_to_g(d, var.d, n.1, n.2)
d |
Standardized mean difference statistic (d has a slight bias). |
var.d |
Variance of d. |
n.1 |
Sample size of treatment group. |
n.2 |
Sample size of comparison group. |
g |
Unbiased Standardized mean difference statistic. |
var.g |
Variance of g. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
Data from Table 15.3 in The Handbook for Research Synthesis and Meta-Analysis (Cooper et al., 2009)
Data from Table A2 in The Handbook for Research Synthesis and Meta-Analysis (Cooper et al., 2009)
Subset of simulated data to demonstrate aggregation for dependent effect sizes. This data comes from: Hoyt, W. T., & Del Re, A. C. (2013). Comparison of methods for aggregating dependent effect sizes in meta-analysis. Manuscript submitted for publication.
This data set includes effect sizes for treatment vs control groups for a random subset of 8 simulated psychotherapy treatment studies (total population k = 1000). The known population standardized mean difference for outcome one is g = 0.50 and for outcome two g = 0.80. The data set also includes two correlated study-level variables (i.e., moderators): treatment duration (dose
) and average participant distress (stress
).
This data accompanies a tutorial for meta-analysis:
Del Re, A. C. (2015). A Practical Tutorial on Conducting Meta-Analysis in R. The Quantitative Methods for Psychology.
This data set includes aggregated effect sizes for treatment vs control groups for a random subset of 8 simulated psychotherapy treatment studies (total population k = 1000). The known population standardized mean difference for outcome one is g = 0.50 and for outcome two g = 0.80. The data set also includes two correlated study-level variables (i.e., moderators): treatment duration (dose
) and average participant distress (stress
).
This data accompanies a tutorial for meta-analysis:
Del Re, A. C. (2015). A Practical Tutorial on Conducting Meta-Analysis in R. The Quantitative Methods for Psychology.
This data set includes means and standard deviations for treatment and control groups for a subset of k = 8 simulated psychotherapy treatment studies from a population of k = 1000 (see dat.sim1 and dat.sim2 for the k = 1000 studies for outcome 1 and 2, respectfully). Although effect sizes are not calculated in this dataset, the known population standardized mean difference for outcome one is d=0.50 and for outcome two g=0.80. The data set also includes two correlated study-level variables (i.e., moderators): treatment duration (dose
) and average participant distress (stress
).
This data accompanies a tutorial for meta-analysis:
Del Re, A. C. (2015). A Practical Tutorial on Conducting Meta-Analysis in R. The Quantitative Methods for Psychology.
This data set includes 1000 simulated psychotherapy treatment studies. The population standardized mean difference for outcome one is d=0.50. The data set also includes two correlated study-level variables (i.e., moderators): treatment duration (dose
) and average participant distress (stress
).
This data accompanies a tutorial for meta-analysis:
Del Re, A. C. (2015). A Practical Tutorial on Conducting Meta-Analysis in R. The Quantitative Methods for Psychology.
This data set includes 1000 simulated psychotherapy treatment studies. The population standardized mean difference for outcome two is d=0.80. The data set also includes two correlated study-level variables (i.e., moderators): treatment duration (dose
) and average participant distress (stress
).
This data accompanies a tutorial for meta-analysis:
Del Re, A. C. (2015). A Practical Tutorial on Conducting Meta-Analysis in R. The Quantitative Methods for Psychology.
Converts F-test value to standardized mean difference (d).
f_to_d(f, n.1, n.2)
f_to_d(f, n.1, n.2)
f |
F-value reported in primary study. |
n.1 |
Sample size of treatment group. |
n.2 |
Sample size of comparison group. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein, M. (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts an ANCOVA F-statistic to d (standardized mean difference).
f.ancova_to_d(f, n.1, n.2, R, q)
f.ancova_to_d(f, n.1, n.2, R, q)
f |
F-test value from ANCOVA. |
n.1 |
Treatment group sample size. |
n.2 |
Comparison group sample size. |
R |
Covariate outcome correlation or multiple correlation. |
q |
number of covariates. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts number of 'failure' groups reported in the primary study to standardized mean difference (d).
fail_to_d(B, D, n.1, n.0)
fail_to_d(B, D, n.1, n.0)
B |
Treatment failure. |
D |
Non-treatment failure. |
n.1 |
Treatment sample size. |
n.0 |
Control/comparison sample size. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Computes single score or average score ICCs as an index of interrater reliability of quantitative data. Additionally, F-test and confidence interval are computed.
icc(ratings, model = c("oneway", "twoway"), type = c("consistency", "agreement"), unit = c("single", "average"), r0 = 0, conf.level = 0.95)
icc(ratings, model = c("oneway", "twoway"), type = c("consistency", "agreement"), unit = c("single", "average"), r0 = 0, conf.level = 0.95)
ratings |
n*m matrix or dataframe, n subjects m raters. |
model |
a character string specifying if a |
type |
a character string specifying if '"consistency"' (default) or '"agreement"' between raters should be estimated. If a '"oneway"' model is used, only '"consistency"' could be computed. You can specify just the initial letter. |
unit |
a character string specifying the unit of analysis: Must be one of |
r0 |
specification of the null hypothesis r = r0. Note that a one sided test (H1: r > r0) is performed. |
conf.level |
confidence level of the interval. |
This function was created by Matthias Gamer for the irr
package. For more details, see:
http://rss.acs.unt.edu/Rdoc/library/irr/html/icc.html
Details for the function:
Missing data are omitted in a listwise way. When considering which form of ICC is appropriate for an actual set of data, one has take several decisions (Shrout & Fleiss, 1979):
1. Should only the subjects be considered as random effects (oneway
model) or are subjects and raters randomly chosen from a bigger pool of persons (twoway
model).
2. If differences in judges' mean ratings are of interest, interrater agreement
instead of consistency
should be computed.
3. If the unit of analysis is a mean of several ratings, unit should be changed to average
. In most cases, however, single values (unit = single
) are regarded.
A list with class icclist
containing the following components:
subjects |
the number of subjects examined. |
raters |
the number of raters. |
model |
a character string describing the selected model for the analysis. |
type |
a character string describing the selected type of interrater reliability. |
unit |
a character string describing the unit of analysis. |
icc.name |
a character string specifying the name of ICC according to McGraw & Wong (1996). |
value |
the intraclass correlation coefficient. |
r0 |
the specified null hypothesis. |
Fvalue |
the value of the F-statistic. |
df1 |
the numerator degrees of freedom. |
df2 |
the denominator degrees of freedom. |
p.value |
the p-value for a two-sided test. |
conf.level |
the confidence level for the interval. |
lbound |
the lower bound of the confidence interval. |
ubound |
the upper bound of the confidence interval. |
Matthias Gamer
Bartko, J.J. (1966). The intraclass correlation coefficient as a measure of reliability. Psychological Reports, 19, 3-11.
McGraw, K.O., & Wong, S.P. (1996), Forming inferences about some intraclass correlation coefficients. Psychological Methods, 1, 30-46.
Shrout, P.E., & Fleiss, J.L. (1979), Intraclass correlation: uses in assessing rater reliability. Psychological Bulletin, 86, 420-428.
# sample data study <- c(1,1,2,2,3,3) rater <- c(rep(1:2,3)) mod1 <- round(rnorm(6, 10, 1)) mod2 <- c(5,5, 9, 9, 8, 8) mod3 <- c(10,10, 9, 9, 8, 8) w <-data.frame(study, rater, mod1, mod2, mod3) w # if data is in this format: # study rater mod1 mod2 mod3 # 1 1 9 9 10 # 1 2 11 8 10 # 2 1 9 10 11 # 2 2 9 10 11 # 3 1 9 9 8 # 3 2 12 9 8 # # the data will need to be reshaped to be processed by the # icc function: long <- reshape(w, varying=colnames(w)[3:5], v.names="Code", idvar=c('study', 'rater'), timevar="mods", direction='long') wide <- reshape(long, idvar=c('mods', 'study'), timevar='rater') # icc function (created by Matthias Gamer for the 'irr' package) icc(cbind(wide$Code.1, wide$Code.2), type= "consistency")
# sample data study <- c(1,1,2,2,3,3) rater <- c(rep(1:2,3)) mod1 <- round(rnorm(6, 10, 1)) mod2 <- c(5,5, 9, 9, 8, 8) mod3 <- c(10,10, 9, 9, 8, 8) w <-data.frame(study, rater, mod1, mod2, mod3) w # if data is in this format: # study rater mod1 mod2 mod3 # 1 1 9 9 10 # 1 2 11 8 10 # 2 1 9 10 11 # 2 2 9 10 11 # 3 1 9 9 8 # 3 2 12 9 8 # # the data will need to be reshaped to be processed by the # icc function: long <- reshape(w, varying=colnames(w)[3:5], v.names="Code", idvar=c('study', 'rater'), timevar="mods", direction='long') wide <- reshape(long, idvar=c('mods', 'study'), timevar='rater') # icc function (created by Matthias Gamer for the 'irr' package) icc(cbind(wide$Code.1, wide$Code.2), type= "consistency")
Kappa coefficients for assessing inter-rater agreement between two coders (for categorical
variables/moderators).
Kappa(rater1, rater2)
Kappa(rater1, rater2)
rater1 |
First rater of categorical variable to be analyzed. This vector needs to be in a separate column if in a |
rater2 |
Second rater on same categorical variable to be analyzed. This vector needs to be in a separate column if in a |
Kappa coefficients for inter-rater reliability (categorical variables).
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
# sample data study <- c(1,1,2,2,3,3) # study coded rater <- rep(1:2, 3) # 2 raters mod1 <- as.factor(round(rnorm(6, 10, 1))) # values coded for mod 1 mod2 <- as.factor(round(rnorm(6, 10, 1))) mod3 <- as.factor(round(rnorm(6, 10, 1))) mod4 <- as.factor(round(rnorm(6, 10, 1))) mod5 <- as.factor(round(rnorm(6, 10, 1))) mod6 <- as.factor(round(rnorm(6, 10, 1))) w <-data.frame(study, rater,mod1, mod2, mod3, mod4, mod5, mod6) w # if data is in this format: # study rater mod1 mod2 mod3 mod4 mod5 mod6 # 1 1 8 10 9 9 10 10 # 1 2 10 11 10 10 13 12 # 2 1 11 10 11 11 10 12 # 2 2 13 10 10 11 12 9 # 3 1 11 10 11 10 10 9 # 3 2 10 10 11 9 10 11 # # the data will need to be reshaped to be processed by the # Kappa function: long <- reshape(w, varying=colnames(w)[3:8], v.names="code", idvar=c('study', 'rater'), timevar= 'mods', direction='long') wide <- reshape(long, idvar=c('mods', 'study'), timevar='rater') wide # running the function: Kappa(wide$code.1, wide$code.2)
# sample data study <- c(1,1,2,2,3,3) # study coded rater <- rep(1:2, 3) # 2 raters mod1 <- as.factor(round(rnorm(6, 10, 1))) # values coded for mod 1 mod2 <- as.factor(round(rnorm(6, 10, 1))) mod3 <- as.factor(round(rnorm(6, 10, 1))) mod4 <- as.factor(round(rnorm(6, 10, 1))) mod5 <- as.factor(round(rnorm(6, 10, 1))) mod6 <- as.factor(round(rnorm(6, 10, 1))) w <-data.frame(study, rater,mod1, mod2, mod3, mod4, mod5, mod6) w # if data is in this format: # study rater mod1 mod2 mod3 mod4 mod5 mod6 # 1 1 8 10 9 9 10 10 # 1 2 10 11 10 10 13 12 # 2 1 11 10 11 11 10 12 # 2 2 13 10 10 11 12 9 # 3 1 11 10 11 10 10 9 # 3 2 10 10 11 9 10 11 # # the data will need to be reshaped to be processed by the # Kappa function: long <- reshape(w, varying=colnames(w)[3:8], v.names="code", idvar=c('study', 'rater'), timevar= 'mods', direction='long') wide <- reshape(long, idvar=c('mods', 'study'), timevar='rater') wide # running the function: Kappa(wide$code.1, wide$code.2)
Converts a log odds ratio reported in the primary study to a standardized mean difference (d).
lor_to_d(lor, var.lor)
lor_to_d(lor, var.lor)
lor |
Log odds ratio reported in the primary study. |
var.lor |
Variance of the log odds ratio. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Computes single predictor categorical moderator analysis under a fixed or random effects model.
macat(g, var, mod, data, method= "random")
macat(g, var, mod, data, method= "random")
g |
Hedges g (unbiased estimate of d) effect size. |
var |
Vaiance of g. |
mod |
Categorical moderator variable used for moderator analysis. |
method |
Default is |
data |
|
See Konstantopoulos & Hedges (2009; pp. 280-288) for the computations used in this function.
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. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
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.
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")
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")
Function for a planned comparison between two levels of a moderator under a fixed or random effects model.
macatC(x1, x2, g, var, mod, data, method= "random", type= "post.hoc")
macatC(x1, x2, g, var, mod, data, method= "random", type= "post.hoc")
x1 |
One level of categorical moderator. |
x2 |
Comparison level of same categorical moderator. |
g |
Hedges g (unbiased estimate of d) effect size. |
var |
Vaiance of g. |
mod |
Categorical moderator variable used for moderator analysis. |
method |
Default is |
type |
|
data |
|
See Konstantopoulos & Hedges (2009; pp. 280-288) for the computations used in this function.
diff |
Mean difference between the two levels. |
var.diff |
Variance of diff. |
p |
Significance level. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
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.
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 macatC(1, 2, g=g, var=var.g, mod=mod, data=df, method= "random", type= "post.hoc")
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 macatC(1, 2, g=g, var=var.g, mod=mod, data=df, method= "random", type= "post.hoc")
Meta-regression function for a single or multiple predictor model. This function is a wrapper for the rma()
function in the metafor package (Viechtbauer, W, 2010). Please see http://CRAN.R-project.org/package=metafor for details or for more advanced functionality with the rma()
function.
mareg(formula, var, data, method = "REML", subset, digits = 3, ...)
mareg(formula, var, data, method = "REML", subset, digits = 3, ...)
formula |
This is a formula based function, similar to other functions in R (e.g., lm), where the criterion variable (e.g., Hedges g in this case) is dependent on ('~') the predictor variables (e.g., moderators). The formula for two moderators would take this form: mareg(g ~ mod1 + mod2, var.g, data), where g is the criterion variable predicted by mod1 and mod2. The variance (var) of each g is var.g in this case. |
var |
Variance of g. |
data |
Aggregated |
method |
Default is |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
digits |
Number of digits to output. Default is 3. |
... |
Additional arguments to be passed to rma(). |
See Wolfgang Viechtbauer (2010). metafor: Meta-Analysis Package for
R. R package version 1.1-0. for the details of the rma()
function. http://CRAN.R-project.org/package=metafor
estimate |
Meta-regression coefficient estimate. |
se |
Standard error of the estimate coefficient. |
z |
z-value. |
ci.l |
Lower 95% confidence interval. |
ci.u |
Upper 95% confidence interval. |
p |
p-value (significance level). |
QE |
Q-error. Measure of error in the model. |
QE.df |
Degrees of freedom for Q-error. |
QEp |
Q-error p-value (for homogeneity). |
QM |
Q-model. Measure of model fit. |
QM.df |
Degrees of freedom for Q-model. |
QMp |
Q-between p-value (for homogeneity). QM and QMp provide the test of whether the moderator variable(s) account for significant variance among effect sizes. |
Wolfgang Viechtbauer (2010). metafor: Meta-Analysis Package for R. R package version 1.1-0. http://CRAN.R-project.org/package=metafor
# install metafor # install.packages('metafor', dependencies = TRUE) # Sample data data(dat.sim.final) # Examples # OMNIBUS m0 <- mareg(es~1, var=var, data=dat.sim.final) summary(m0) # META-REGRESSION m1 <- mareg(es~dose, var=var, data=dat.sim.final) summary(m1) # SINGLE MODERATOR m2 <- mareg(es~stress, var=var, data=dat.sim.final) summary(m2) # SINGLE MODERATOR m3 <- mareg(es~dose + stress, var=var, data=dat.sim.final) summary(m3) # MULTIPLE MODERATOR
# install metafor # install.packages('metafor', dependencies = TRUE) # Sample data data(dat.sim.final) # Examples # OMNIBUS m0 <- mareg(es~1, var=var, data=dat.sim.final) summary(m0) # META-REGRESSION m1 <- mareg(es~dose, var=var, data=dat.sim.final) summary(m1) # SINGLE MODERATOR m2 <- mareg(es~stress, var=var, data=dat.sim.final) summary(m2) # SINGLE MODERATOR m3 <- mareg(es~dose + stress, var=var, data=dat.sim.final) summary(m3) # MULTIPLE MODERATOR
Converts raw mean scores reported in the primary study to a standardized mean difference (d).
mean_to_d(m.1, m.2, sd.1, sd.2, n.1, n.2)
mean_to_d(m.1, m.2, sd.1, sd.2, n.1, n.2)
m.1 |
Mean of group one. |
m.2 |
Mean of group two. |
sd.1 |
Standard deviation of group one. |
sd.2 |
Standard deviation of group two. |
n.1 |
Sample size of group one. |
n.2 |
Sample size of group two. |
d |
Standardized mean difference (d). |
var.d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts raw mean scores with pooled standard deviation from the primary study to a standardized mean difference (d).
mean_to_d2(m.1, m.2, s.pooled, n.1, n.2)
mean_to_d2(m.1, m.2, s.pooled, n.1, n.2)
m.1 |
Mean of group one. |
m.2 |
Mean of group two. |
s.pooled |
Pooled standard deviation. |
n.1 |
Sample size of group one. |
n.2 |
Sample size of group two. |
d |
Standardized mean difference (d). |
var.d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts odds ratio reported in the primary study to standardized mean difference (d).
or_to_d(or)
or_to_d(or)
or |
Odds ratio. |
d |
Standardized mean difference (d). |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
One-tailed p-value reported in the primary study to Standardized Mean Difference (d)
p_to_d1(p, n.1, n.2)
p_to_d1(p, n.1, n.2)
p |
One-tailed p-value reported in primary study. |
n.1 |
Sample size of treatment group. |
n.2 |
Sample size of comparison group. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
One-tailed p-value reported in primary study to Standardized Mean Difference (d)
p_to_d2(p, n.1, n.2)
p_to_d2(p, n.1, n.2)
p |
Two-tailed p-value reported in primary study. |
n.1 |
Sample size of treatment group. |
n.2 |
Sample size of comparison group. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts a one-tailed p-value from ANCOVA reported in the primary study to a standardized mean difference (d)
p.ancova_to_d1(p, n.1, n.2, R, q)
p.ancova_to_d1(p, n.1, n.2, R, q)
p |
One-tailed p-value reported in primary study. |
n.1 |
Treatment group sample size. |
n.2 |
Comparison group sample size. |
R |
Covariate outcome correlation or multiple correlation. |
q |
number of covariates. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts a two-tailed p-value from ANCOVA reported in the primary study to a standardized mean difference (d)
p.ancova_to_d2(p, n.1, n.2, R, q)
p.ancova_to_d2(p, n.1, n.2, R, q)
p |
Two-tailed p-value reported in primary study. |
n.1 |
Treatment group sample size. |
n.2 |
Comparison group sample size. |
R |
Covariate outcome correlation or multiple correlation. |
q |
number of covariates. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Outputs boxplot graphic for each level of the specified moderator.
plotcat(g, var, mod, data, modname=NULL, title=NULL, ...)
plotcat(g, var, mod, data, modname=NULL, title=NULL, ...)
g |
Hedges g (unbiased estimate of d) effect size. |
var |
Vaiance of g. |
mod |
Categorical moderator variable used for moderator analysis. |
data |
|
modname |
Name of moderator to appear on x axis of plot. Default is NULL. |
title |
Plot title. Default is NULL. |
... |
Additional arguments to be passed to ggplot. |
Boxplot graph with median, max, min, and outliers from a fixed or random effects categorical moderator analysis. Places jitter points (for each study) on the boxplots. The size of each point (representing a study in the analysis) are based on study weights where more precise studies have larger points. The ggplot2 package outputs the graphics.
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Cooper, H., Hedges, L.V., & Valentine, J.C. (2009). The handbook of research synthesis and meta-analysis (2nd edition). New York: Russell Sage Foundation.
id<-c(1, 1:19) 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 ## Not run: plotcat(g = g, var = var.g, mod = mod, data = df, method= "random", modname= "Moderator") ## End(Not run)
id<-c(1, 1:19) 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 ## Not run: plotcat(g = g, var = var.g, mod = mod, data = df, method= "random", modname= "Moderator") ## End(Not run)
Outputs a scatterplot from a fixed or random effects meta regression (continuous and/or categorical).
plotcon(g, var, mod, data, method= "random", modname=NULL, title=NULL, ...)
plotcon(g, var, mod, data, method= "random", modname=NULL, title=NULL, ...)
g |
Hedges g (unbiased estimate of d) effect size. |
var |
Vaiance of g. |
mod |
Categorical moderator variable used for moderator analysis. |
method |
Default is |
data |
|
modname |
Name of moderator to appear on x axis of plot. Default is NULL. |
title |
Plot title. Default is NULL. |
... |
Additional arguments to be passed to ggplot. |
Scatterplot with fixed or random effects regression line with size of visual points based on study weights, where the more precise studies have larger points. The ggplot2 package outputs the rich graphics.
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Cooper, H., Hedges, L.V., & Valentine, J.C. (2009). The handbook of research synthesis and meta analysis (2nd edition). New York: Russell Sage Foundation.
# SAMPLE DATA MA2 <-read.table(textConnection(" id es1 var1 n.1 n.2 mod1 mod2 1 1 0.5695938 0.04906967 26 30 a 20 2 2 0.4123667 0.04362541 28 34 b 30 3 3 0.4084333 0.04458363 34 28 a 25 4 4 0.5014756 0.04186354 37 29 b 35 5 5 0.5540745 0.04339382 31 32 b 40 6 1 0.5695938 0.04906967 26 30 a 20 7 2 0.4123667 0.04362541 28 34 b 30 8 3 0.4084333 0.04458363 34 28 a 25 9 4 0.5014756 0.04186354 37 29 b 35 10 5 0.5540745 0.04339382 31 32 b 40")) # EXAMPLE plotcon(es1, var1, mod2, data=MA2, method= "fixed", modname="NULL",title="NULL")
# SAMPLE DATA MA2 <-read.table(textConnection(" id es1 var1 n.1 n.2 mod1 mod2 1 1 0.5695938 0.04906967 26 30 a 20 2 2 0.4123667 0.04362541 28 34 b 30 3 3 0.4084333 0.04458363 34 28 a 25 4 4 0.5014756 0.04186354 37 29 b 35 5 5 0.5540745 0.04339382 31 32 b 40 6 1 0.5695938 0.04906967 26 30 a 20 7 2 0.4123667 0.04362541 28 34 b 30 8 3 0.4084333 0.04458363 34 28 a 25 9 4 0.5014756 0.04186354 37 29 b 35 10 5 0.5540745 0.04339382 31 32 b 40")) # EXAMPLE plotcon(es1, var1, mod2, data=MA2, method= "fixed", modname="NULL",title="NULL")
Assess for publication bias in the meta-analytic data
PubBias(data)
PubBias(data)
data |
|
k |
Number of studies. |
Z |
Overall z-value for data set. |
k0 |
Number of studies needed to include with effect size = 0 (null) in order for the p > .05 (null hypothesis retained). |
k.per |
Number of missing studies for every observed study for the overall effect to be nullified. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Sutton, A. J. (2009). Publication bias. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta analysis (pp. 435-452). New York: Russell Sage Foundation.
Converting Chi-squared statistic (with 1 degree of freedom) reported in primary study to r
r_from_chi(chi.sq, n)
r_from_chi(chi.sq, n)
chi.sq |
Chi squared statistic from primary study. |
n |
Sample size in primary study. |
Computes correlation coefficient (r).
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_d
,
r_from_d1
,
r_from_t
Converts d (mean difference) to r where n.tmt = n.comparison (see section 12.5.4, Borenstein, 2009; pp. 234).
r_from_d(d, var.d, a = 4)
r_from_d(d, var.d, a = 4)
d |
Mean difference statistic (d) reported in primary study. |
var.d |
Variance of d reported in primary study. |
a |
Used to compute correlation. Default is 4. |
Outputs a correlation coefficient (r).
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d1
,
r_from_t
Converts d (mean difference) reported in primary study to r (correlation coefficient) where sample size of the treatment group is not equal to the sample size of the comparison group (see section 12.5.4, Borenstein, 2009; pp. 234).
r_from_d1(d, n.1, n.2, var.d)
r_from_d1(d, n.1, n.2, var.d)
d |
Mean difference statistic (d) reported in primary study. |
n.1 |
sample size of group one reported in primary study. |
n.2 |
sample size of group two reported in primary study. |
var.d |
variance of d reported in primary study. |
Computes a correlation coefficient (r).
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_t
Compute correlation from t-value reported in the primary study (see section 12.5.4, Borenstein, 2009; pp. 234).
r_from_t(t, n)
r_from_t(t, n)
t |
t-statistic value reported in primary study. |
n |
Sample size reported in primary study. |
Outputs the correlation coefficient (r).
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
Converts a correlation (r) to standardized mean difference (d).
r_to_d(r, N)
r_to_d(r, N)
r |
Correlation coefficient. |
N |
Total sample size. |
d |
Standardized mean difference (d). |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
When the correlation between dependent effect sizes are unknown, one approach is to conduct the meta-analysis by assuming that the effect sizes are independent. Then, Hedges et al. (2010) robust standard error procedure can be calculated to adjust for dependence.
robustSE(model, cluster=NULL, CI=.95, digits=3)
robustSE(model, cluster=NULL, CI=.95, digits=3)
model |
omnibus or moderator model object fitted from mareg() function. |
cluster |
Name of variable where the dependencies are present. This will typically be the variable for study id where |
CI |
Confidence interval. Defaults to .95. |
digits |
Number of digits to output. Defaults to 3. |
estimate |
Meta-regression coefficient estimate. |
se |
Adjusted Standard error of the estimate coefficient. |
t |
t-value. |
ci.l |
Adjusted Lower 95% confidence interval. |
ci.u |
Adjusted Upper 95% confidence interval. |
p |
p-value. |
Mike Cheung with modifications by AC Del Re
Hedges, L. V., Tipton, E., & Johnson, M. C. (2010). Robust variance estimation in meta-regression with dependent effect size estimates. Research Synthesis Methods, 1(1), 39-65. doi:10.1002/jrsm.5
Cheung, M.W.L. (2012). metaSEM: An R package for meta-analysis using structural equation modeling. Manuscript submitted for publication.
# install metafor # install.packages('metafor', dependencies = TRUE) # Sample data 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))) mods2<-c(rep(1:5,4)) df<-data.frame(id, n.1,n.2, g, var.g,mod, mods2) # Examples # Adjusted SE robustSE(mareg(g~ mod + mods2, var = var.g, method = "REML", data = df))
# install metafor # install.packages('metafor', dependencies = TRUE) # Sample data 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))) mods2<-c(rep(1:5,4)) df<-data.frame(id, n.1,n.2, g, var.g,mod, mods2) # Examples # Adjusted SE robustSE(mareg(g~ mod + mods2, var = var.g, method = "REML", data = df))
Converts a t-test value reported in the primary study to a standardized mean difference (d).
t_to_d(t, n.1, n.2)
t_to_d(t, n.1, n.2)
t |
t-test value reported in primary study. |
n.1 |
Sample size of treatment group. |
n.2 |
Sample size of comparison group. |
d |
Standardized mean difference (d). |
var_d |
Variance of d. |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
tt.ancova_to_d
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Converts a t-test value from ANCOVA to a standardized mean difference (d)
tt.ancova_to_d(t, n.1, n.2, R, q)
tt.ancova_to_d(t, n.1, n.2, R, q)
t |
t-test value reported in primary study. |
n.1 |
Treatment group sample size. |
n.2 |
Comparison group sample size. |
R |
Covariate outcome correlation or multiple correlation. |
q |
number of covariates. |
d |
Standardized mean difference (d) |
var_d |
Variance of d |
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]
Borenstein (2009). Effect sizes for continuous data. 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.
d_to_g
,
mean_to_d
,
mean_to_d2
,
t_to_d
,
f_to_d
,
p_to_d1
,
p_to_d2
,
ancova_to_d1
,
ancova_to_d2
,
f.ancova_to_d
,
r_to_d
,
p.ancova_to_d1
,
p.ancova_to_d2
,
lor_to_d
,
prop_to_or
,
prop_to_d
,
r_from_chi
,
r_from_d
,
r_from_d1
,
r_from_t
Adds weights to the meta-analysis data set.
wgts(g, var.g, data)
wgts(g, var.g, data)
g |
Hedges g (unbiased standardized mean difference estimate). |
var.g |
Variance of g. |
data |
|
Adds fixed and random-effects weights and confidence intervals to meta data set.
AC Del Re & William T. Hoyt
Maintainer: AC Del Re [email protected]