Package 'vcmeta'

Title: Varying Coefficient Meta-Analysis
Description: Implements functions for varying coefficient meta-analysis methods. These methods do not assume effect size homogeneity. Subgroup effect size comparisons, general linear effect size contrasts, and linear models of effect sizes based on varying coefficient methods can be used to describe effect size heterogeneity. Varying coefficient meta-analysis methods do not require the unrealistic assumptions of the traditional fixed-effect and random-effects meta-analysis methods. For details see: Statistical Methods for Psychologists, Volume 5, <https://dgbonett.sites.ucsc.edu/>.
Authors: Douglas G. Bonett [aut, cre], Robert J. Calin-Jageman [ctb]
Maintainer: Douglas G. Bonett <[email protected]>
License: GPL-3
Version: 1.4.0
Built: 2024-11-06 02:55:59 UTC
Source: https://github.com/dgbonett/vcmeta

Help Index


Computes Pearson correlation between paired measurements from t statistic

Description

This function computes the Pearson correlation between paired measurements using a reported paired-samples t statistic and other sample information. This correlation estimate is needed in several functions that analyze mean differences and standardized mean differences in paired-samples studies.

Usage

cor.from.t(m1, m2, sd1, sd2, t, n)

Arguments

m1

estimated mean for measurement 1

m2

estimated mean for measurement 2

sd1

estimated standard deviation for measurement 1

sd2

estimated standard deviation for measurement 2

t

value for paired-samples t-test

n

sample size

Value

Returns the sample Pearson correlation between the two paired measurements

Examples

cor.from.t(9.4, 9.8, 1.26, 1.40, 2.27, 30)

# Should return:
#                Estimate
# Correlation:  0.7415209

Confidence interval for an average G-index agreement coefficient

Description

Computes the estimate, standard error, and confidence interval for an average G-index of agreement from two or more studies. This function assumes that two raters each provide a dichotomous rating to a sample of objects. As a measure of agreement, the G-index is usually preferred to Cohen's kappa.

Usage

meta.ave.agree(alpha, f11, f12, f21, f22, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

f11

vector of frequency counts in cell 1,1

f12

vector of frequency counts in cell 1,2

f21

vector of frequency counts in cell 2,1

f22

vector of frequency counts in cell 2,2

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

f11 <- c(43, 56, 49)
f12 <- c(7, 2, 9)
f21 <- c(3, 5, 5)
f22 <- c(37, 54, 39)
meta.ave.agree(.05, f11, f12, f21, f22, bystudy = TRUE)

# Should return:
#          Estimate         SE        LL        UL
# Average 0.7843250 0.03540254 0.7149373 0.8537127
# Study 1 0.7446809 0.06883919 0.6097585 0.8796032
# Study 2 0.8512397 0.04770701 0.7577356 0.9447437
# Study 3 0.6981132 0.06954284 0.5618117 0.8344147

Confidence interval for an average Pearson or partial correlation

Description

Computes the estimate, standard error, and confidence interval for an average Pearson or partial correlation from two or more studies. The sample correlations must be all Pearson correlations or all partial correlations. Use the meta.ave.gen function to meta-analyze any combination of Pearson, partial, or Spearman correlations.

Usage

meta.ave.cor(alpha, n, cor, s, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated correlations

s

number of control variables (set to 0 for Pearson)

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2008). “Meta-analytic interval estimation for bivariate correlations.” Psychological Methods, 13(3), 173–181. ISSN 1939-1463, doi:10.1037/a0012868.

Examples

n <- c(55, 190, 65, 35)
cor <- c(.40, .65, .60, .45)
meta.ave.cor(.05, n, cor, 0, bystudy = TRUE)

# Should return:
#         Estimate         SE        LL        UL
# Average    0.525 0.05113361 0.4176678 0.6178816
# Study 1    0.400 0.11430952 0.1506943 0.6014699
# Study 2    0.650 0.04200694 0.5594086 0.7252465
# Study 3    0.600 0.08000000 0.4171458 0.7361686
# Study 4    0.450 0.13677012 0.1373507 0.6811071

Confidence interval for an average correlation of any type

Description

Computes the estimate, standard error, and confidence interval for an average correlation. Any type of correlation can be used (e.g., Pearson, Spearman, semipartial, factor correlation, Gamma coefficient, Somers d coefficient, tetrachoric, point-biserial, biserial, etc.).

Usage

meta.ave.cor.gen(alpha, cor, se, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

cor

vector of estimated correlations

se

vector of standard errors

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2008). “Meta-analytic interval estimation for bivariate correlations.” Psychological Methods, 13(3), 173–181. ISSN 1939-1463, doi:10.1037/a0012868.

Examples

cor <- c(.396, .454, .409, .502, .350)
se <- c(.104, .064, .058, .107, .086)
meta.ave.cor.gen(.05, cor, se, bystudy = TRUE)

# Should return:
#         Estimate         SE        LL        UL
# Average   0.4222 0.03853362 0.3438560 0.4947070
# Study 1   0.3960 0.10400000 0.1753200 0.5787904
# Study 2   0.4540 0.06400000 0.3200675 0.5701415
# Study 3   0.4090 0.05800000 0.2893856 0.5160375
# Study 4   0.5020 0.10700000 0.2651183 0.6817343
# Study 5   0.3500 0.08600000 0.1716402 0.5061435

Confidence interval for an average Cronbach alpha reliability

Description

Computes the estimate, standard error, and confidence interval for an average Cronbach reliability coefficient from two or more studies.

Usage

meta.ave.cronbach(alpha, n, rel, r, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

rel

vector of sample reliabilities

r

number of measurements (e.g., items) used to compute each reliability

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2010). “Varying coefficient meta-analytic methods for alpha reliability.” Psychological Methods, 15(4), 368–385. ISSN 1939-1463, doi:10.1037/a0020142.

Examples

n <- c(583, 470, 546, 680)
rel <- c(.91, .89, .90, .89)
meta.ave.cronbach(.05, n, rel, 10, bystudy = TRUE)

# Should return:
#         Estimate          SE        LL        UL
# Average   0.8975 0.003256081 0.8911102 0.9038592
# Study 1   0.9100 0.005566064 0.8985763 0.9204108
# Study 2   0.8900 0.007579900 0.8743616 0.9041013
# Study 3   0.9000 0.006391375 0.8868623 0.9119356
# Study 4   0.8900 0.006297549 0.8771189 0.9018203

Fisher confidence interval for an average correlation.

Description

This function should be used with the meta.ave.gen function when the effect size is a correlation. Use the estimated average correlation and its standard error from meta.ave.gen in this function to obtain a more accurate confidence interval for the population average correlation.

Usage

meta.ave.fisher(alpha, cor, se)

Arguments

alpha

alpha value for 1-alpha confidence

cor

estimate of average correlation

se

standard error of average correlation

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimate of average correlation (from input)

  • LL - lower limit of the confidence interval

  • UL - lower limit of the confidence interval

Examples

meta.ave.fisher(0.05, 0.376, .054)

# Should return:
# Estimate        LL        UL
#    0.376 0.2656039 0.4766632

Confidence interval for an average of any parameter

Description

Computes the estimate, standard error, and confidence interval for an average of any type of parameter from two or more studies.

Usage

meta.ave.gen(alpha, est, se, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

est

vector of parameter estimates

se

vector of standard errors

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

est <- c(.022, .751, .421, .287, .052, .146, .562, .904)
se <- c(.124, .464, .102, .592, .864, .241, .252, .318)
meta.ave.gen(.05, est, se, bystudy = TRUE)

# Should return:
#          Estimate        SE          LL        UL
# Average  0.393125 0.1561622  0.08705266 0.6991973
# Study 1  0.022000 0.1240000 -0.22103553 0.2650355
# Study 2  0.751000 0.4640000 -0.15842329 1.6604233
# Study 3  0.421000 0.1020000  0.22108367 0.6209163
# Study 4  0.287000 0.5920000 -0.87329868 1.4472987
# Study 5  0.052000 0.8640000 -1.64140888 1.7454089
# Study 6  0.146000 0.2410000 -0.32635132 0.6183513
# Study 7  0.562000 0.2520000  0.06808908 1.0559109
# Study 8  0.904000 0.3180000  0.28073145 1.5272685

Confidence interval for an average effect size using a constant coefficient model

Description

Computes the estimate, standard error, and confidence interval for a weighted average effect from two or more studies using the constant coefficient (fixed-effect) meta-analysis model.

Usage

meta.ave.gen.cc(alpha, est, se, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

est

vector of parameter estimates

se

vector of standard errors

bystudy

logical to also return each study estimate (TRUE) or not

Details

The weighted average estimate will be biased regardless of the number of studies or the sample size in each study. The actual confidence interval coverage probability can be much smaller than the specified confidence level when the population effect sizes are not identical across studies.

The constant coefficient model should be used with caution, and the varying coefficient methods in this package are the recommended alternatives. The varying coefficient methods do not require effect-size homogeneity across the selected studies. This constant coefficient meta-analysis function is included in the vcmeta package primarily for classroom demonstrations to illustrate the problematic characteristics of the constant coefficient meta-analysis model.

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

  • Hedges LV, Olkin I (1985). Statistical methods for meta-analysis. Academic Press, New York. ISBN 01-233-63802.

  • Borenstein M, Hedges LV, Higgins JP, Rothstein HR (2009). Introduction to meta-analysis. Wiley, New York.

See Also

meta.ave.gen

Examples

est <- c(.022, .751, .421, .287, .052, .146, .562, .904)
se <- c(.124, .464, .102, .592, .864, .241, .252, .318)
meta.ave.gen.cc(.05, est, se, bystudy = TRUE)

# Should return:
#             Estimate         SE          LL        UL
# Average    0.3127916 0.06854394  0.17844794 0.4471352
# Study 1    0.0220000 0.12400000 -0.22103553 0.2650355
# Study 2    0.7510000 0.46400000 -0.15842329 1.6604233
# Study 3    0.4210000 0.10200000  0.22108367 0.6209163
# Study 4    0.2870000 0.59200000 -0.87329868 1.4472987
# Study 5    0.0520000 0.86400000 -1.64140888 1.7454089
# Study 6    0.1460000 0.24100000 -0.32635132 0.6183513
# Study 7    0.5620000 0.25200000  0.06808908 1.0559109
# Study 8    0.9040000 0.31800000  0.28073145 1.5272685

Confidence interval for an average effect size using a random coefficient model

Description

Computes the estimate, standard error, and confidence interval for a weighted average effect from multiple studies using the random coefficient (random-effects) meta-analysis model. An estimate of effect-size heterogeneity (tau-squared) is also computed.

Usage

meta.ave.gen.rc(alpha, est, se, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

est

vector of parameter estimates

se

vector of standard errors

bystudy

logical to also return each study estimate (TRUE) or not

Details

The random coefficient model assumes that the studies in the meta-analysis are a random sample from some definable superpopulation of studies. This assumption is very difficult to justify. The weighted average estimate will be biased regardless of the number of studies or the sample size in each study. The actual confidence interval coverage probability can much smaller than the specified confidence level if the effect sizes are correlated with the weights (which occurs frequently). The confidence interval for tau-squared assumes that the true effect sizes in the superpopulation of studies have a normal distribution. A large number of studies, each with a large sample size, is required to assess the superpopulation normality assumption and to accurately estimate tau-squared. The confidence interval for the population tau-squared is hypersensitive to very minor and difficult-to-detect violations of the superpopulation normality assumption.

The random coefficient model should be used with caution, and the varying coefficient methods in this package are the recommended alternatives. The varying coefficient methods allows the effect sizes to differ across studies but do not require the studies to be a random sample from a definable superpopoulation of studies. This random coefficient function is included in the vcmeta package primarily for classroom demonstrations to illustrate the problimatic characteristics of the random coefficient meta-analysis model.

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is true, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

  • Hedges LV, Olkin I (1985). Statistical methods for meta-analysis. Academic Press, New York. ISBN 01-233-63802.

  • Borenstein M, Hedges LV, Higgins JP, Rothstein HR (2009). Introduction to meta-analysis. Wiley, New York.

See Also

meta.ave.gen

Examples

est <- c(.022, .751, .421, .287, .052, .146, .562, .904)
se <- c(.124, .464, .102, .592, .864, .241, .252, .318)
meta.ave.gen.rc(.05, est, se, bystudy = TRUE)

# Should return: 
#               Estimate        SE          LL        UL
# Tau-squared 0.03772628 0.0518109  0.00000000 0.1392738
# Average     0.35394806 0.1155239  0.12752528 0.5803708
# Study 1     0.02200000 0.1240000 -0.22103553 0.2650355
# Study 2     0.75100000 0.4640000 -0.15842329 1.6604233
# Study 3     0.42100000 0.1020000  0.22108367 0.6209163
# Study 4     0.28700000 0.5920000 -0.87329868 1.4472987
# Study 5     0.05200000 0.8640000 -1.64140888 1.7454089
# Study 6     0.14600000 0.2410000 -0.32635132 0.6183513
# Study 7     0.56200000 0.2520000  0.06808908 1.0559109
# Study 8     0.90400000 0.3180000  0.28073145 1.5272685

Confidence interval for an average mean difference from paired-samples studies

Description

Computes the estimate, standard error, and confidence interval for an average mean difference from two or more paired-samples studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence interval for the average effect size. Equality of variances within or across studies is not assumed.

Usage

meta.ave.mean.ps(alpha, m1, m2, sd1, sd2, cor, n, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(53, 60, 53, 57)
m2 <- c(55, 62, 58, 61)
sd1 <- c(4.1, 4.2, 4.5, 4.0)
sd2 <- c(4.2, 4.7, 4.9, 4.8)
cor <- c(.7, .7, .8, .85)
n <- c(30, 50, 30, 70)
meta.ave.mean.ps(.05, m1, m2, sd1, sd2, cor, n, bystudy = TRUE)

# Should return:
#        Estimate        SE        LL         UL      df
# Average   -3.25 0.2471557 -3.739691 -2.7603091 112.347
# Study 1   -2.00 0.5871400 -3.200836 -0.7991639  29.000
# Study 2   -2.00 0.4918130 -2.988335 -1.0116648  49.000
# Study 3   -5.00 0.5471136 -6.118973 -3.8810270  29.000
# Study 4   -4.00 0.3023716 -4.603215 -3.3967852  69.000

Confidence interval for an average mean difference from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for an average mean difference from two or more 2-group studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence intervals. Equality of variances within or across studies is not assumed.

Usage

meta.ave.mean2(alpha, m1, m2, sd1, sd2, n1, n2, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(7.4, 6.9)
m2 <- c(6.3, 5.7)
sd1 <- c(1.72, 1.53)
sd2 <- c(2.35, 2.04)
n1 <- c(40, 60)
n2 <- c(40, 60)
meta.ave.mean2(.05, m1, m2, sd1, sd2, n1, n2, bystudy = TRUE)

# Should return:
#         Estimate        SE        LL       UL        df
# Average     1.15 0.2830183 0.5904369 1.709563 139.41053
# Study 1     1.10 0.4604590 0.1819748 2.018025  71.46729
# Study 2     1.20 0.3292036 0.5475574 1.852443 109.42136

Confidence interval for an average mean ratio from paired-samples studies

Description

Computes the estimate, standard error, and confidence interval for a geometric average mean ratio from two or more paired-samples studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence interval for the average effect size. Equality of variances within or across studies is not assumed.

Usage

meta.ave.meanratio.ps(alpha, m1, m2, sd1, sd2, cor, n, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

  • df - degrees of freedom

Examples

m1 <- c(53, 60, 53, 57)
m2 <- c(55, 62, 58, 61)
sd1 <- c(4.1, 4.2, 4.5, 4.0)
sd2 <- c(4.2, 4.7, 4.9, 4.8)
cor <- c(.7, .7, .8, .85)
n <- c(30, 50, 30, 70)
meta.ave.meanratio.ps(.05, m1, m2, sd1, sd2, cor, n, bystudy = TRUE)

# Should return:
#            Estimate          SE          LL          UL
# Average -0.05695120 0.004350863 -0.06558008 -0.04832231
# Study 1 -0.03704127 0.010871086 -0.05927514 -0.01480740
# Study 2 -0.03278982 0.008021952 -0.04891054 -0.01666911
# Study 3 -0.09015110 0.009779919 -0.11015328 -0.07014892
# Study 4 -0.06782260 0.004970015 -0.07773750 -0.05790769
#         exp(Estimate)   exp(LL)   exp(UL)       df
# Average     0.9446402 0.9365240 0.9528266 103.0256
# Study 1     0.9636364 0.9424474 0.9853017  29.0000
# Study 2     0.9677419 0.9522663 0.9834691  49.0000
# Study 3     0.9137931 0.8956968 0.9322550  29.0000
# Study 4     0.9344262 0.9252073 0.9437371  69.0000

Confidence interval for an average mean ratio from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for a geometric average mean ratio from two or more 2-group studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence intervals. Equality of variances within or across studies is not assumed.

Usage

meta.ave.meanratio2(alpha, m1, m2, sd1, sd2, n1, n2, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

  • df - degrees of freedom

References

Bonett DG, Price RM (2020). “Confidence intervals for ratios of means and medians.” Journal of Educational and Behavioral Statistics, 45(6), 750–770. ISSN 1076-9986, doi:10.3102/1076998620934125.

Examples

m1 <- c(7.4, 6.9)
m2 <- c(6.3, 5.7)
sd1 <- c(1.7, 1.5)
sd2 <- c(2.3, 2.0)
n1 <- c(40, 20)
n2 <- c(40, 20)
meta.ave.meanratio2(.05, m1, m2, sd1, sd2, n1, n2, bystudy = TRUE)

# Should return:
#          Estimate         SE          LL        UL  exp(Estimate)
# Average 0.1759928 0.05738065 0.061437186 0.2905484       1.192429
# Study 1 0.1609304 0.06820167 0.024749712 0.2971110       1.174603
# Study 2 0.1910552 0.09229675 0.002986265 0.3791242       1.210526
#          exp(LL)  exp(UL)       df
# Average 1.063364 1.337161 66.26499
# Study 1 1.025059 1.345965 65.69929
# Study 2 1.002991 1.461004 31.71341

Confidence interval for average odds ratio from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for a geometric average odds ratio from two or more studies.

Usage

meta.ave.odds(alpha, f1, f2, n1, n2, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - the exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

References

Bonett DG, Price RM (2015). “Varying coefficient meta-analysis methods for odds ratios and risk ratios.” Psychological Methods, 20(3), 394–406. ISSN 1939-1463, doi:10.1037/met0000032.

Examples

n1 <- c(204, 201, 932, 130, 77)
n2 <- c(106, 103, 415, 132, 83)
f1 <- c(24, 40, 93, 14, 5)
f2 <- c(12, 9, 28, 3, 1)
meta.ave.odds(.05, f1, f2, n1, n2, bystudy = TRUE)

# Should return:
#           Estimate        SE          LL        UL 
# Average 0.86211102 0.2512852  0.36960107 1.3546210
# Study 1 0.02581353 0.3700520 -0.69947512 0.7511022
# Study 2 0.91410487 0.3830515  0.16333766 1.6648721
# Study 3 0.41496672 0.2226089 -0.02133877 0.8512722
# Study 4 1.52717529 0.6090858  0.33338907 2.7209615
# Study 5 1.42849472 0.9350931 -0.40425414 3.2612436
#         exp(Estimate)   exp(LL)   exp(UL)
# Average      2.368155 1.4471572  3.875292
# Study 1      1.026150 0.4968460  2.119335
# Study 2      2.494541 1.1774342  5.284997
# Study 3      1.514320 0.9788873  2.342625
# Study 4      4.605150 1.3956902 15.194925
# Study 5      4.172414 0.6674745 26.081952

Confidence interval for an average slope coefficient in a general linear model or a path model.

Description

Computes the estimate, standard error, and confidence interval for an average slope coefficient in a general linear model (ANOVA, ANCOVA, multiple regression) or a path model from two or more studies.

Usage

meta.ave.path(alpha, n, slope, se, s, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

slope

vector of slope estimates

se

vector of slope standard errors

s

number of predictors of the response variable

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

n <- c(75, 85, 250, 160)
slope <- c(1.57, 1.38, 1.08, 1.25)
se <- c(.658, .724, .307, .493)
meta.ave.path(.05, n, slope, se, 2, bystudy = TRUE)

#  Should return:
#         Estimate         SE          LL       UL       df
#  Average     1.32 0.2844334  0.75994528 1.880055 263.1837
#  Study 1     1.57 0.6580000  0.25830097 2.881699  72.0000
#  Study 2     1.38 0.7240000 -0.06026664 2.820267  82.0000
#  Study 3     1.08 0.3070000  0.47532827 1.684672 247.0000
#  Study 4     1.25 0.4930000  0.27623174 2.223768 157.0000

Confidence interval for an average point-biserial correlation

Description

Computes the estimate, standard error, and confidence interval for an average point-biserial correlation from two or more studies. Two types of point-biserial correlations can be meta-analyzed. One type uses an unweighted variance and is appropriate in 2-group experimental designs. The other type uses a weighted variance and is appropriate in 2-group nonexperimental designs with simple random sampling (but not stratified random sampling) within each study. This function requires all point-biserial correlations to be of the same type. Use the meta.ave.gen function to meta-analyze any combination of biserial correlation types.

Usage

meta.ave.pbcor(alpha, m1, m2, sd1, sd2, n1, n2, type, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

type
  • set to 1 for weighted variance

  • set to 2 for unweighted variance

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2020). “Point-biserial correlation: Interval estimation, hypothesis testing, meta-analysis, and sample size determination.” British Journal of Mathematical and Statistical Psychology, 73(S1), 113–144. ISSN 0007-1102, doi:10.1111/bmsp.12189.

Examples

m1 <- c(21.9, 23.1, 19.8)
m2 <- c(16.1, 17.4, 15.0)
sd1 <- c(3.82, 3.95, 3.67)
sd2 <- c(3.21, 3.30, 3.02)
n1 <- c(40, 30, 24)
n2 <- c(40, 28, 25)
meta.ave.pbcor(.05, m1, m2, sd1, sd2, n1, n2, 2, bystudy = TRUE)

# Should return:
#          Estimate         SE        LL        UL
# Average 0.6159094 0.04363432 0.5230976 0.6942842
# Study 1 0.6349786 0.06316796 0.4842098 0.7370220
# Study 2 0.6160553 0.07776700 0.4255342 0.7380898
# Study 3 0.5966942 0.08424778 0.3903883 0.7283966

Forest plot for average effect sizes

Description

Generates a forest plot to visualize effect sizes estimates and overall averages from the meta.ave functions in vcmeta. If the column exp(Estimate) is present, this function plots the exponentiated effect size and CI found in columns exp(Estimate), exp(LL), and exp(UL). Otherwise, this function plots the effect size and CI found in the columns Estimate, LL, and UL.

Usage

meta.ave.plot(
  result,
  reference_line = NULL,
  diamond_height = 0.2,
  ggtheme = ggplot2::theme_classic()
)

Arguments

result
  • a result matrix from any of the replicate functions in vcmeta

reference_line

Optional x-value for a reference line. Only applies if focuse is 'Difference' or 'Both'. Defaults to NULL, in which case a reference line is not drawn.

diamond_height
  • Optional height of the diamond representing average effect size. Only applies if focus is 'Average' or 'Both'. Defaults to 0.2

ggtheme
  • optional ggplot2 theme object; defaults to theme_classic()

Value

Returns a ggplot object. If stored, can be further customized via the ggplot API

Examples

# Plot results from meta.ave.mean2
m1 <- c(7.4, 6.9)
m2 <- c(6.3, 5.7)
sd1 <- c(1.72, 1.53)
sd2 <- c(2.35, 2.04)
n1 <- c(40, 60)
n2 <- c(40, 60)
result <- meta.ave.mean2(.05, m1, m2, sd1, sd2, n1, n2, bystudy = TRUE)
meta.ave.plot(result, reference_line = 0)


# Plot results from meta.ave.meanratio2
# Note that this plots the exponentiated effect size and CI
m1 <- c(53, 60, 53, 57)
m2 <- c(55, 62, 58, 61)
sd1 <- c(4.1, 4.2, 4.5, 4.0)
sd2 <- c(4.2, 4.7, 4.9, 4.8)
cor <- c(.7, .7, .8, .85)
n <- c(30, 50, 30, 70)
result <- meta.ave.meanratio.ps(.05, m1, m2, sd1, sd2, cor, n, bystudy = TRUE)
myplot <- meta.ave.plot(result, reference_line = 1)
myplot

# Change x-scale to log2
library(ggplot2)
myplot <- myplot + scale_x_continuous(
  trans = 'log2', 
  limits = c(0.75, 1.25), 
  name = "Estimated Ratio of Means, Log2 Scale"
)
myplot

Confidence interval for an average proportion difference in paired-samples studies

Description

Computes the estimate, standard error, and confidence interval for an average proportion difference from two or more studies.

Usage

meta.ave.prop.ps(alpha, f11, f12, f21, f22, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

f11

vector of frequency counts in cell 1,1

f12

vector of frequency counts in cell 1,2

f21

vector of frequency counts in cell 2,1

f22

vector of frequency counts in cell 2,2

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG, Price RM (2014). “Meta-analysis methods for risk differences.” British Journal of Mathematical and Statistical Psychology, 67(3), 371–387. ISSN 00071102, doi:10.1111/bmsp.12024.

Examples

f11 <- c(17, 28, 19)
f12 <- c(43, 56, 49)
f21 <- c(3, 5, 5)
f22 <- c(37, 54, 39)
meta.ave.prop.ps(.05, f11, f12, f21, f22, bystudy = TRUE)

# Should return:
#          Estimate         SE        LL        UL
# Average 0.3809573 0.03000016 0.3221581 0.4397565
# Study 1 0.3921569 0.05573055 0.2829270 0.5013867
# Study 2 0.3517241 0.04629537 0.2609869 0.4424614
# Study 3 0.3859649 0.05479300 0.2785726 0.4933572

Confidence interval for an average proportion difference in 2-group studies

Description

Computes the estimate, standard error, and confidence interval for an average proportion difference from two or more studies.

Usage

meta.ave.prop2(alpha, f1, f2, n1, n2, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG, Price RM (2014). “Meta-analysis methods for risk differences.” British Journal of Mathematical and Statistical Psychology, 67(3), 371–387. ISSN 00071102, doi:10.1111/bmsp.12024.

Examples

n1 <- c(204, 201, 932, 130, 77)
n2 <- c(106, 103, 415, 132, 83)
f1 <- c(24, 40, 93, 14, 5)
f2 <- c(12, 9, 28, 3, 1)
meta.ave.prop2(.05, f1, f2, n1, n2, bystudy = TRUE)

# Should return:
#             Estimate         SE            LL         UL
# Average 0.0567907589 0.01441216  2.854345e-02 0.08503807
# Study 1 0.0009888529 0.03870413 -7.486985e-02 0.07684756
# Study 2 0.1067323481 0.04018243  2.797623e-02 0.18548847
# Study 3 0.0310980338 0.01587717 -2.064379e-05 0.06221671
# Study 4 0.0837856174 0.03129171  2.245499e-02 0.14511624
# Study 5 0.0524199553 0.03403926 -1.429577e-02 0.11913568

Confidence interval for an average proportion ratio from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for a geometric average proportion ratio from two or more studies.

Usage

meta.ave.propratio2(alpha, f1, f2, n1, n2, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

References

Price RM, Bonett DG (2008). “Confidence intervals for a ratio of two independent binomial proportions.” Statistics in Medicine, 27(26), 5497–5508. ISSN 02776715, doi:10.1002/sim.3376.

Examples

n1 <- c(204, 201, 932, 130, 77)
n2 <- c(106, 103, 415, 132, 83)
f1 <- c(24, 40, 93, 14, 5)
f2 <- c(12, 9, 28, 3, 1)
meta.ave.propratio2(.05, f1, f2, n1, n2, bystudy = TRUE)

#  Should return:
#           Estimate        SE          LL        UL 
# Average 0.84705608 0.2528742  0.35143178 1.3426804
# Study 1 0.03604257 0.3297404 -0.61023681 0.6823220
# Study 2 0.81008932 0.3442007  0.13546839 1.4847103
# Study 3 0.38746839 0.2065227 -0.01730864 0.7922454
# Study 4 1.49316811 0.6023296  0.31262374 2.6737125
# Study 5 1.50851199 0.9828420 -0.41782290 3.4348469
#     exp(Estimate)   exp(LL)   exp(UL)
# Average  2.332769 1.4211008  3.829294
# Study 1  1.036700 0.5432222  1.978466
# Study 2  2.248109 1.1450730  4.413686
# Study 3  1.473246 0.9828403  2.208350
# Study 4  4.451175 1.3670071 14.493677
# Study 5  4.520000 0.6584788 31.026662

Confidence interval for an average semipartial correlation

Description

Computes the estimate, standard error, and confidence interval for an average semipartial correlation from two or more studies.

Usage

meta.ave.semipart(alpha, n, cor, r2, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated semipartial correlations

r2

vector of squared multiple correlations for a model that includes the IV and all control variables

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

n <- c(128, 97, 210, 217)
cor <- c(.35, .41, .44, .39)
r2 <- c(.29, .33, .36, .39)
meta.ave.semipart(.05, n, cor, r2, bystudy = TRUE)

# Should return:
#         Estimate         SE        LL        UL
# Average   0.3975 0.03221240 0.3325507 0.4586965
# Study 1   0.3500 0.07175200 0.2023485 0.4820930
# Study 2   0.4100 0.07886080 0.2447442 0.5521076
# Study 3   0.4400 0.05146694 0.3338366 0.5351410
# Study 4   0.3900 0.05085271 0.2860431 0.4848830

Confidence interval for an average slope coefficient

Description

Computes the estimate, standard error, and confidence interval for an average slope coefficient in a simple linear regression model from two or more studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence interval.

Usage

meta.ave.slope(alpha, n, cor, sdy, sdx, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated correlations

sdy

vector of estimated SDs of y

sdx

vector of estimated SDs of x

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

Examples

n <- c(45, 85, 50, 60)
cor <- c(.24, .35, .16, .20)
sdy <- c(12.2, 14.1, 11.7, 15.9)
sdx <- c(1.34, 1.87, 2.02, 2.37)
meta.ave.slope(.05, n, cor, sdy, sdx, bystudy = TRUE)

# Should return:
#          Estimate        SE         LL       UL       df
# Average 1.7731542 0.4755417  0.8335021 2.712806 149.4777
# Study 1 2.1850746 1.3084468 -0.4536599 4.823809  43.0000
# Study 2 2.6390374 0.7262491  1.1945573 4.083518  83.0000
# Study 3 0.9267327 0.8146126 -0.7111558 2.564621  48.0000
# Study 4 1.3417722 0.8456799 -0.3510401 3.034584  58.0000

Confidence interval for an average Spearman correlation

Description

Computes the estimate, standard error, and confidence interval for an average Spearman correlation from two or more studies. The Spearman correlation is preferred to the Pearson correlation if the relation between the two quantitative variables is monotonic rather than linear or if the bivariate normality assumption is not plausible.

Usage

meta.ave.spear(alpha, n, cor, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated Spearman correlations

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2008). “Meta-analytic interval estimation for bivariate correlations.” Psychological Methods, 13(3), 173–181. ISSN 1939-1463, doi:10.1037/a0012868.

Examples

n <- c(150, 200, 300, 200, 350)
cor <- c(.14, .29, .16, .21, .23)
meta.ave.spear(.05, n, cor, bystudy = TRUE)

# Should return:
#         Estimate         SE          LL        UL
# Average    0.206 0.02944265  0.14763960 0.2629309
# Study 1    0.140 0.08031750 -0.02151639 0.2943944
# Study 2    0.290 0.06492643  0.15476515 0.4145671
# Study 3    0.160 0.05635101  0.04689807 0.2690514
# Study 4    0.210 0.06776195  0.07187439 0.3402225
# Study 5    0.230 0.05069710  0.12690280 0.3281809

Confidence interval for an average standardized mean difference from paired-samples studies

Description

Computes the estimate, standard error, and confidence interval for an average standardized mean difference from two or more paired-samples studies. Squrare root Unweighted variances and a single condition standard deviation are options for the standardizer. Equality of variances within or across studies is not assumed.

Usage

meta.ave.stdmean.ps(alpha, m1, m2, sd1, sd2, cor, n, stdzr, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for measurement 1 SD standardizer

  • set to 2 for measurement 2 SD standardizer

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(23.9, 24.1)
m2 <- c(25.1, 26.9)
sd1 <- c(1.76, 1.58)
sd2 <- c(2.01, 1.76)
cor <- c(.78, .84)
n <- c(25, 30)
meta.ave.stdmean.ps(.05, m1, m2, sd1, sd2, cor, n, 1, bystudy = TRUE)

# Should return: 
#           Estimate        SE        LL         UL
# Average -1.1931045 0.1568034 -1.500433 -0.8857755
# Study 1 -0.6818182 0.1773785 -1.029474 -0.3341628
# Study 2 -1.7721519 0.2586234 -2.279044 -1.2652594

Confidence interval for an average standardized mean difference from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for an average standardized mean difference from two or more 2-group studies. Square root unweighted variances, square root weighted variances, and single group standard deviation are options for the standardizer. Equality of variances within or across studies is not assumed.

Usage

meta.ave.stdmean2(alpha, m1, m2, sd1, sd2, n1, n2, stdzr, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for group 1 SD standardizer

  • set to 2 for group 2 SD standardizer

  • set to 3 for square root weighted average variance standardizer

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated effect size

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(21.9, 23.1, 19.8)
m2 <- c(16.1, 17.4, 15.0)
sd1 <- c(3.82, 3.95, 3.67)
sd2 <- c(3.21, 3.30, 3.02)
n1 <- c(40, 30, 24)
n2 <- c(40, 28, 25)
meta.ave.stdmean2(.05, m1, m2, sd1, sd2, n1, n2, 0, bystudy = TRUE)

# Should return: 
#         Estimate        SE        LL       UL
# Average 1.526146 0.1734341 1.1862217 1.866071
# Study 1 1.643894 0.2629049 1.1286100 2.159178
# Study 2 1.566132 0.3056278 0.9671126 2.165152
# Study 3 1.428252 0.3289179 0.7835848 2.072919

Confidence interval for an average variance

Description

Computes the estimate and confidence interval for an average variance from two or more studies. The estimated average variance or the upper confidence limit could be used as a variance planning value in sample size planning.

Usage

meta.ave.var(alpha, var, n, bystudy = TRUE)

Arguments

alpha

alpha level for 1-alpha confidence

var

vector of sample variances

n

vector of sample sizes

bystudy

logical to also return each study estimate (TRUE) or not

Value

Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:

  • Estimate - estimated variance

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

var <- c(26.63, 22.45, 34.12)
n <- c(40, 30, 50)
meta.ave.var(.05, var, n, bystudy = TRUE)

# Should return:
#         Estimate       LL       UL
# Average 27.73333 21.45679 35.84589
# Study 1 26.63000 17.86939 43.90614
# Study 2 22.45000 14.23923 40.57127
# Study 3 34.12000 23.80835 52.98319

Computes a chi-square test of effect-size homogeneity

Description

Computes a chi-square test of effect size homogeneity and p-value using effect-size estimates and their standard errors from two or more studies. This test should not be used to justify the use of a constant coeffient (fixed-effect) meta-analysis.

Usage

meta.chitest(est, se)

Arguments

est

vector of effect-size estimates

se

vector of effect-size standard errors

Value

Returns a one-row matrix:

  • Q - chi-square test statitic

  • df - degrees of freedom

  • p - p-value

References

Borenstein M, Hedges LV, Higgins JP, Rothstein HR (2009). Introduction to meta-analysis. Wiley, New York.

Examples

est <- c(.297, .324, .281, .149) 
se <- c(.082, .051, .047, .094)
meta.chitest(est, se)

# Should return:
#         Q df         p
#  2.706526  3 0.4391195

Confidence interval for a linear contrast of G-index coefficients

Description

Computes the estimate, standard error, and adjusted Wald confidence interval for a linear contrast of G-index of agreement coefficients from two or more studies. This function assumes that two raters each provide a dichotomous rating for a sample of objects.

Usage

meta.lc.agree(alpha, f11, f12, f21, f22, v)

Arguments

alpha

alpha level for 1-alpha confidence

f11

vector of frequency counts in cell 1,1

f12

vector of frequency counts in cell 1,2

f21

vector of frequency counts in cell 2,1

f22

vector of frequency counts in cell 2,2

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the adjusted Wald confidence interval

  • UL - upper limit of the adjusted Wald confidence interval

Examples

f11 <- c(43, 56, 49)
f12 <- c(7, 2, 9)
f21 <- c(3, 5, 5)
f22 <- c(37, 54, 39)
v <- c(.5, .5, -1)
meta.lc.agree(.05, f11, f12, f21, f22, v)

# Should return:
#            Estimate        SE         LL        UL
# Contrast 0.1022939 0.07972357 -0.05396142 0.2585492

Confidence interval for a linear contrast of effect sizes

Description

Computes the estimate, standard error, and confidence interval for a linear contrast of any type of effect size from two or more studies.

Usage

meta.lc.gen(alpha, est, se, v)

Arguments

alpha

alpha level for 1-alpha confidence

est

vector of parameter estimates

se

vector of standard errors

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

est <- c(.55, .59, .44, .48, .26, .19)
se <- c(.054, .098, .029, .084, .104, .065)
v <- c(.5, .5, -.25, -.25, -.25, -.25)
meta.lc.gen(.05, est, se, v)

# Should return: 
#          Estimate         SE        LL        UL
# Contrast   0.2275 0.06755461 0.0950954 0.3599046

Confidence interval for a linear contrast of mean differences from paired-samples studies

Description

Computes the estimate, standard error, and confidence interval for a linear contrast of paired-samples mean differences from two or more studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence interval. Equality of variances within or across studies is not assumed.

Usage

meta.lc.mean.ps(alpha, m1, m2, sd1, sd2, cor, n, v)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(53, 60, 53, 57)
m2 <- c(55, 62, 58, 61)
sd1 <- c(4.1, 4.2, 4.5, 4.0)
sd2 <- c(4.2, 4.7, 4.9, 4.8)
cor <- c(.7, .7, .8, .85)
n <- c(30, 50, 30, 70)
v <- c(.5, .5, -.5, -.5)
meta.lc.mean.ps(.05, m1, m2, sd1, sd2, cor, n, v)

# Should return:
#          Estimate        SE       LL       UL      df
# Contrast      2.5 0.4943114 1.520618 3.479382 112.347

Confidence interval for a linear contrast of means

Description

Computes the estimate, standard error, and confidence interval for a linear contrast of means from two or more studies. This function will use either an unequal variance (recommended) or an equal variance method. A Satterthwaite adjustment to the degrees of freedom is used with the unequal variance method.

Usage

meta.lc.mean1(alpha, m, sd, n, v, eqvar = FALSE)

Arguments

alpha

alpha level for 1-alpha confidence

m

vector of estimated means

sd

vector of estimated standard deviations

n

vector of sample sizes

v

vector of contrast coefficients

eqvar
  • FALSE for unequal variance method

  • TRUE for equal variance method

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Snedecor GW, Cochran WG (1980). Statistical methods, 7th edition. ISU University Pres, Ames, Iowa.

Examples

m <- c(33.5, 37.9, 38.0, 44.1)
sd <- c(3.84, 3.84, 3.65, 4.98)
n <- c(10, 10, 10, 10)
v <- c(.5, .5, -.5, -.5)
meta.lc.mean1(.05, m, sd, n, v, eqvar = FALSE)

# Should return:
#          Estimate       SE        LL        UL       df
# Contrast    -5.35 1.300136 -7.993583 -2.706417 33.52169

Confidence interval for a linear contrast of mean differences from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for a linear contrast of 2-group mean differences from two or more studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence interval. Equality of variances within or across studies is not assumed.

Usage

meta.lc.mean2(alpha, m1, m2, sd1, sd2, n1, n2, v)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(45.1, 39.2, 36.3, 34.5)
m2 <- c(30.0, 35.1, 35.3, 36.2)
sd1 <- c(10.7, 10.5, 9.4, 11.5)
sd2 <- c(12.3, 12.0, 10.4, 9.6)
n1 <- c(40, 20, 50, 25)
n2 <- c(40, 20, 48, 26)
v <- c(.5, .5, -.5, -.5)
meta.lc.mean2(.05, m1, m2, sd1, sd2, n1, n2, v)

# Should return:
#          Estimate       SE       LL       UL       df
# Contrast     9.95 2.837787 4.343938 15.55606 153.8362

Confidence interval for a log-linear contrast of mean ratios from paired-samples studies

Description

Computes the estimate, standard error, and confidence interval for a log-linear contrast of paired-sample mean ratios from two or more studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence interval. Equality of variances within or across studies is not assumed.

Usage

meta.lc.meanratio.ps(alpha, m1, m2, sd1, sd2, cor, n, v)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimatedf log-linear contrast

  • SE - standard error of log-linear contrast

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - exponentiated log-linear contrast

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

  • df - degrees of freedom

References

Bonett DG, Price RM (2020). “Confidence intervals for ratios of means and medians.” Journal of Educational and Behavioral Statistics, 45(6), 750–770. ISSN 1076-9986, doi:10.3102/1076998620934125.

Examples

m1 <- c(53, 60, 53, 57)
m2 <- c(55, 62, 58, 61)
sd1 <- c(4.1, 4.2, 4.5, 4.0)
sd2 <- c(4.2, 4.7, 4.9, 4.8)
cor <- c(.7, .7, .8, .85)
n <- c(30, 50, 30, 70)
v <- c(.5, .5, -.5, -.5)
meta.lc.meanratio.ps(.05, m1, m2, sd1, sd2, cor, n, v)

# Should return:
#           Estimate          SE         LL         UL exp(Estimate)
# Contrast 0.0440713 0.008701725 0.02681353 0.06132907      1.045057
#           exp(LL)  exp(UL)       df
# Contrast 1.027176 1.063249 103.0256

Confidence interval for a log-linear contrast of mean ratios from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for a log-linear contrast of 2-group mean ratios from two or more studies. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence interval. Equality of variances within or across studies is not assumed.

Usage

meta.lc.meanratio2(alpha, m1, m2, sd1, sd2, n1, n2, v)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated log-linear contrast

  • SE - standard error of log-linear contrast

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - exponentiated log-linear contrast

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

  • df - degrees of freedom

References

Bonett DG, Price RM (2020). “Confidence intervals for ratios of means and medians.” Journal of Educational and Behavioral Statistics, 45(6), 750–770. ISSN 1076-9986, doi:10.3102/1076998620934125.

Examples

m1 <- c(45.1, 39.2, 36.3, 34.5)
m2 <- c(30.0, 35.1, 35.3, 36.2)
sd1 <- c(10.7, 10.5, 9.4, 11.5)
sd2 <- c(12.3, 12.0, 10.4, 9.6)
n1 <- c(40, 20, 50, 25)
n2 <- c(40, 20, 48, 26)
v <- c(.5, .5, -.5, -.5)
meta.lc.meanratio2(.05, m1, m2, sd1, sd2, n1, n2, v)

# Should return:
#           Estimate         SE        LL        UL  exp(Estimate)
# Contrast 0.2691627 0.07959269 0.1119191 0.4264064      1.308868
#           exp(LL)  exp(UL)       df
# Contrast 1.118422 1.531743 152.8665

Confidence interval for a log-linear contrast of odds ratios

Description

Computes the estimate, standard error, and confidence interval for an exponentiated log-linear contrast of odds ratios from two or more studies.

Usage

meta.lc.odds(alpha, f1, f2, n1, n2, v)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated log-linear contrast

  • SE - standard error of log-linear contrast

  • exp(Estimate) - exponentiated log-linear contrast

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

References

Bonett DG, Price RM (2015). “Varying coefficient meta-analysis methods for odds ratios and risk ratios.” Psychological Methods, 20(3), 394–406. ISSN 1939-1463, doi:10.1037/met0000032.

Examples

n1 <- c(50, 150, 150)
f1 <- c(16, 50, 25)
n2 <- c(50, 150, 150)
f2 <- c(7, 15, 20)
v <- c(1, -1, 0)
meta.lc.odds(.05, f1, f2, n1, n2, v)

# Should return:
#            Estimate        SE  exp(Estimate)   exp(LL)  exp(UL)
# Contrast -0.4596883 0.5895438      0.6314805 0.1988563 2.005305

Confidence interval for a linear contrast of proportion differences in paired-samples studies

Description

Computes the estimate, standard error, and adjusted Wald confidence interval for a linear contrast of paired-samples proportion differences from two or more studies.

Usage

meta.lc.prop.ps(alpha, f11, f12, f21, f22, v)

Arguments

alpha

alpha level for 1-alpha confidence

f11

vector of frequency counts in cell 1,1

f12

vector of frequency counts in cell 1,2

f21

vector of frequency counts in cell 2,1

f22

vector of frequency counts in cell 2,2

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the adjusted Wald confidence interval

  • UL - upper limit of the adjusted Wald confidence interval

References

Bonett DG, Price RM (2014). “Meta-analysis methods for risk differences.” British Journal of Mathematical and Statistical Psychology, 67(3), 371–387. ISSN 00071102, doi:10.1111/bmsp.12024.

Examples

f11 <- c(17, 28, 19)
f12 <- c(43, 56, 49)
f21 <- c(3, 5, 5)
f22 <- c(37, 54, 39)
v <- c(.5, .5, -1)
meta.lc.prop.ps(.05, f11, f12, f21, f22, v)

# Should return:
#              Estimate         SE         LL       UL
#  Contrast -0.01436285 0.06511285 -0.1419817 0.113256

Confidence interval for a linear contrast of proportions

Description

Computes the estimate, standard error, and an adjusted Wald confidence interval for a linear contrast of proportions from two or more studies.

Usage

meta.lc.prop1(alpha, f, n, v)

Arguments

alpha

alpha level for 1-alpha confidence

f

vector of frequency counts

n

vector of sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate -estimated linear contrast

  • SE - standard error

  • LL - lower limit of the adjusted Wald confidence interval

  • UL - upper limit of the adjusted Wald confidence interval

References

Price RM, Bonett DG (2004). “An improved confidence interval for a linear function of binomial proportions.” Computational Statistics and Data Analysis, 45(3), 449–456. ISSN 01679473, doi:10.1016/S0167-9473(03)00007-0.

Examples

f <- c(26, 24, 38)
n <- c(60, 60, 60)
v <- c(-.5, -.5, 1)
meta.lc.prop1(.05, f, n, v)

# Should return: 
#           Estimate         SE         LL        UL
# Contrast 0.2119565 0.07602892 0.06294259 0.3609705

Confidence interval for a linear contrast of proportion differences in 2-group studies

Description

Computes the estimate, standard error, and adjusted Wald confidence interval for a linear contrast of 2-group proportion differences from two or more studies.

Usage

meta.lc.prop2(alpha, f1, f2, n1, n2, v)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the adjusted Wald confidence interval

  • UL - upper limit of the adjusted Wald confidence interval

References

Bonett DG, Price RM (2014). “Meta-analysis methods for risk differences.” British Journal of Mathematical and Statistical Psychology, 67(3), 371–387. ISSN 00071102, doi:10.1111/bmsp.12024.

Examples

n1 <- c(50, 150, 150)
n2 <- c(50, 150, 150)
f1 <- c(16, 50, 25)
f2 <- c(7, 15, 20)
v <- c(1, -1, 0)
meta.lc.prop2(.05, f1, f2, n1, n2, v)

# Should return:
#             Estimate         SE         LL        UL
# Contrast -0.05466931 0.09401019 -0.2389259 0.1295873

Confidence interval for a log-linear contrast of proportion ratios from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for an exponentiated log-linear contrast of 2-group proportion ratios from two or more studies.

Usage

meta.lc.propratio2(alpha, f1, f2, n1, n2, v)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

v

vector of contrast coefficients

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated log-linear contrast

  • SE - standard error of log-linear contrast

  • exp(Estimate) - exponentiated log-linear contrast

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

References

Price RM, Bonett DG (2008). “Confidence intervals for a ratio of two independent binomial proportions.” Statistics in Medicine, 27(26), 5497–5508. ISSN 02776715, doi:10.1002/sim.3376.

Examples

n1 <- c(50, 150, 150)
f1 <- c(16, 50, 25)
n2 <- c(50, 150, 150)
f2 <- c(7, 15, 20)
v <- c(1, -1, 0)
meta.lc.propratio2(.05, f1, f2, n1, n2, v)

# Should return:
#            Estimate        SE  exp(Estimate)   exp(LL)  exp(UL)
# Contrast -0.3853396 0.4828218      0.6802196 0.2640405 1.752378

Confidence interval for a linear contrast of standardized mean differences from paired-samples studies

Description

Computes the estimate, standard error, and confidence interval for a linear contrast of paired-samples standardized mean differences from two or more studies. Equality of variances within or across studies is not assumed.

Usage

meta.lc.stdmean.ps(alpha, m1, m2, sd1, sd2, cor, n, v, stdzr)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

v

vector of contrast coefficients

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for measurement 1 SD standardizer

  • set to 2 for measurement 2 SD standardizer

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(53, 60, 53, 57)
m2 <- c(55, 62, 58, 61)
sd1 <- c(4.1, 4.2, 4.5, 4.0)
sd2 <- c(4.2, 4.7, 4.9, 4.8)
cor <- c(.7, .7, .8, .85)
n <- c(30, 50, 30, 70)
v <- c(.5, .5, -.5, -.5)
meta.lc.stdmean.ps(.05, m1, m2, sd1, sd2, cor, n, v, 0)

# Should return:
#            Estimate        SE        LL        UL
# Contrast  0.5127577 0.1392232 0.2398851 0.7856302

Confidence interval for a linear contrast of standardized mean differences from 2-group studies

Description

Computes the estimate, standard error, and confidence interval for a linear contrast of 2-group standardized mean differences from two or more studies. Equality of variances within or across studies is not assumed. Use the square root average variance standardizer (stdzr = 0) for 2-group experimental designs. Use the square root weighted variance standardizer (stdzr = 3) for 2-group nonexperimental designs with simple random sampling. The stdzr = 1 and stdzr = 2 options can be used with either experimental or nonexperimental designs.

Usage

meta.lc.stdmean2(alpha, m1, m2, sd1, sd2, n1, n2, v, stdzr)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

v

vector of contrast coefficients

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for group 1 SD standardizer

  • set to 2 for group 2 SD standardizer

  • set to 3 for square root weighted average variance standardizer

Value

Returns 1-row matrix with the following columns:

  • Estimate - estimated linear contrast

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

m1 <- c(45.1, 39.2, 36.3, 34.5)
m2 <- c(30.0, 35.1, 35.3, 36.2)
sd1 <- c(10.7, 10.5, 9.4, 11.5)
sd2 <- c(12.3, 12.0, 10.4, 9.6)
n1 <- c(40, 20, 50, 25)
n2 <- c(40, 20, 48, 26)
v <- c(.5, .5, -.5, -.5)
meta.lc.stdmean2(.05, m1, m2, sd1, sd2, n1, n2, v, 0)

# Should return: 
#           Estimate        SE        LL       UL
# Contrast 0.8557914 0.2709192 0.3247995 1.386783

Meta-regression analysis for G agreement indices

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a G-index of agreement. The estimates are OLS estimates with robust standard errors that accomodate residual heteroscedasticity.

Usage

meta.lm.agree(alpha, f11, f12, f21, f22, X)

Arguments

alpha

alpha level for 1-alpha confidence

f11

vector of frequency counts in cell 1,1

f12

vector of frequency counts in cell 1,2

f21

vector of frequency counts in cell 2,1

f22

vector of frequency counts in cell 2,2

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

f11 <- c(40, 20, 25, 30)
f12 <- c(3, 2, 2, 1)
f21 <- c(7, 6, 8, 6)
f22 <- c(26, 25, 13, 25)
x1 <- c(1, 1, 4, 6)
x2 <- c(1, 1, 0, 0)
X <- matrix(cbind(x1, x2), 4, 2)
meta.lm.agree(.05, f11, f12, f21, f22, X)

# Should return:
#     Estimate         SE         z     p          LL        UL
# b0 0.1904762 0.38772858 0.4912617 0.623 -0.56945786 0.9504102
# b1 0.0952381 0.07141957 1.3335013 0.182 -0.04474169 0.2352179
# b2 0.4205147 0.32383556 1.2985438 0.194 -0.21419136 1.0552207

Meta-regression analysis for Pearson or partial correlations

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a Fisher-transformed Pearson or partial correlation. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The correlations are Fisher-transformed and hence the parameter estimates do not have a simple interpretation. However, the hypothesis test results can be used to decide if a population slope is either positive or negative.

Usage

meta.lm.cor(alpha, n, cor, s, X)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated Pearson or partial correlations

s

number of control variables

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - Standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

n <- c(55, 190, 65, 35)
cor <- c(.40, .65, .60, .45)
q <- 0
x1 <- c(18, 25, 23, 19)
X <- matrix(x1, 4, 1)
meta.lm.cor(.05, n, cor, q, X)

# Should return: 
#       Estimate         SE         z     p           LL         UL
# b0 -0.47832153 0.48631509 -0.983563 0.325 -1.431481595 0.47483852
# b1  0.05047154 0.02128496  2.371231 0.018  0.008753794 0.09218929

Meta-regression analysis for correlations

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a Fisher-transformed correlation. The correlations can be of different types (e.g., Pearson, partial, Spearman). The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. This function uses estimated correlations and their standard errors as input. The correlations are Fisher-transformed and hence the parameter estimates do not have a simple interpretation. However, the hypothesis test results can be used to decide if a population slope is either positive or negative.

Usage

meta.lm.cor.gen(alpha, cor, se, X)

Arguments

alpha

alpha level for 1-alpha confidence

cor

vector of estimated correlations

se

number of control variables

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

cor <- c(.40, .65, .60, .45)
se <- c(.182, .114, .098, .132)
x1 <- c(18, 25, 23, 19)
X <- matrix(x1, 4, 1)
meta.lm.cor.gen(.05, cor, se, X)

# Should return: 
#       Estimate         SE          z     p
# b0 -0.47832153 0.63427931 -0.7541181 0.451
# b1  0.05047154 0.02879859  1.7525699 0.080

Meta-regression analysis for Cronbach reliabilities

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a log-complement Cronbach reliablity. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The exponentiated slope estimate for a predictor variable describes a multiplicative change in non-reliability associated with a 1-unit increase in that predictor variable, controlling for all other predictor variables in the model.

Usage

meta.lm.cronbach(alpha, n, rel, r, X)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

rel

vector of estimated reliabilities

r

number of measurements (e.g., items)

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - exponentiated OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the exponentiated confidence interval

  • UL - upper limit of the exponentiated confidence interval

References

Bonett DG (2010). “Varying coefficient meta-analytic methods for alpha reliability.” Psychological Methods, 15(4), 368–385. ISSN 1939-1463, doi:10.1037/a0020142.

Examples

n <- c(583, 470, 546, 680)
rel <- c(.91, .89, .90, .89)
x1 <- c(1, 0, 0, 0)
X <- matrix(x1, 4, 1)
meta.lm.cronbach(.05, n, rel, 10, X)

# Should return:
#      Estimate         SE          z     p         LL          UL
# b0 -2.2408328 0.03675883 -60.960391 0.000 -2.3128788 -2.16878684
# b1 -0.1689006 0.07204625  -2.344336 0.019 -0.3101087 -0.02769259

Meta-regression analysis for any type of effect size

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is any type of effect size. The estimates are OLS estimates with robust standard errors that accomodate residual heteroscedasticity.

Usage

meta.lm.gen(alpha, est, se, X)

Arguments

alpha

alpha level for 1-alpha confidence

est

vector of parameter estimates

se

vector of standard errors

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

est <- c(4.1, 4.7, 4.9, 5.7, 6.6, 7.3)
se <- c(1.2, 1.5, 1.3, 1.8, 2.0, 2.6)
x1 <- c(10, 20, 30, 40, 50, 60)
x2 <- c(1, 1, 1, 0, 0, 0)
X <- matrix(cbind(x1, x2), 6, 2)
meta.lm.gen(.05, est, se, X)

# Should return:
#      Estimate         SE           z     p         LL         UL
# b0  3.5333333 4.37468253  0.80767766 0.419 -5.0408869 12.1075535
# b1  0.0600000 0.09058835  0.66233679 0.508 -0.1175499  0.2375499
# b2 -0.1666667 2.81139793 -0.05928249 0.953 -5.6769054  5.3435720

Meta-regression analysis for paired-samples mean differences

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a paired-samples mean difference. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity.

Usage

meta.lm.mean.ps(alpha, m1, m2, sd1, sd2, cor, n, X)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • t - t-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

n <- c(65, 30, 29, 45, 50)
cor <- c(.87, .92, .85, .90, .88)
m1 <- c(20.1, 20.5, 19.3, 21.5, 19.4)
m2 <- c(10.4, 10.2, 8.5, 10.3, 7.8)
sd1 <- c(9.3, 9.9, 10.1, 10.5, 9.8)
sd2 <- c(7.8, 8.0, 8.4, 8.1, 8.7)
x1 <- c(2, 3, 3, 4, 4)
X <- matrix(x1, 5, 1)
meta.lm.mean.ps(.05, m1, m2, sd1, sd2, cor, n, X)

# Should return:
#    Estimate        SE        t     p        LL        UL  df
# b0     8.00 1.2491990 6.404104 0.000 5.5378833 10.462117 217
# b1     0.85 0.3796019 2.239188 0.026 0.1018213  1.598179 217

Meta-regression analysis for 1-group means

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a mean from one group. The estimates are OLS estimates with robust standard errors that accomodate residual heteroscedasticity.

Usage

meta.lm.mean1(alpha, m, sd, n, X)

Arguments

alpha

alpha level for 1-alpha confidence

m

vector of estimated means

sd

vector of estimated standard deviations

n

vector of sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • t - t-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

Examples

n <- c(25, 15, 30, 25, 40)
m <- c(20.1, 20.5, 19.3, 21.5, 19.4)
sd <- c(10.4, 10.2, 8.5, 10.3, 7.8)
x1 <- c(1, 1, 0, 0, 0)
x2 <- c( 12, 13, 11, 13, 15)
X <- matrix(cbind(x1, x2), 5, 2)
meta.lm.mean1(.05, m, sd, n, X)

# Should return: 
#       Estimate        SE          t     p         LL        UL  df
# b0 19.45490196 6.7873381 2.86635227 0.005  6.0288763 32.880928 132
# b1  0.25686275 1.9834765 0.12950128 0.897 -3.6666499  4.180375 132
# b2  0.04705882 0.5064693 0.09291544 0.926 -0.9547876  1.048905 132

Meta-regression analysis for 2-group mean differences

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a 2-group mean difference. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity.

Usage

meta.lm.mean2(alpha, m1, m2, sd1, sd2, n1, n2, X)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • t - t-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

n1 <- c(65, 30, 29, 45, 50)
n2 <- c(67, 32, 31, 20, 52)
m1 <- c(31.1, 32.3, 31.9, 29.7, 33.0)
m2 <- c(34.1, 33.2, 30.6, 28.7, 26.5)
sd1 <- c(7.1, 8.1, 7.8, 6.8, 7.6)
sd2 <- c(7.8, 7.3, 7.5, 7.2, 6.8)
x1 <- c(4, 6, 7, 7, 8)
x2 <- c(1, 0, 0, 0, 1)
X <- matrix(cbind(x1, x2), 5, 2)
meta.lm.mean2(.05, m1, m2, sd1, sd2, n1, n2, X)

# Should return:
#    Estimate        SE         t     p         LL        UL  df
# b0   -15.20 3.4097610 -4.457791 0.000 -21.902415 -8.497585 418
# b1     2.35 0.4821523  4.873979 0.000   1.402255  3.297745 418
# b2     2.85 1.5358109  1.855697 0.064  -0.168875  5.868875 418

Meta-regression analysis for paired-samples log mean ratios

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a paired-samples log mean ratio. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The exponentiated slope estimate for a predictor variable describes a multiplicative change in the mean ratio associated with a 1-unit increase in that predictor variable, controlling for all other predictor variables in the model.

Usage

meta.lm.meanratio.ps(alpha, m1, m2, sd1, sd2, cor, n, X)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - the exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

Examples

n <- c(65, 30, 29, 45, 50)
cor <- c(.87, .92, .85, .90, .88)
m1 <- c(20.1, 20.5, 19.3, 21.5, 19.4)
m2 <- c(10.4, 10.2, 8.5, 10.3, 7.8)
sd1 <- c(9.3, 9.9, 10.1, 10.5, 9.8)
sd2 <- c(7.8, 8.0, 8.4, 8.1, 8.7)
x1 <- c(2, 3, 3, 4, 4)
X <- matrix(x1, 5, 1)
meta.lm.meanratio.ps(.05, m1, m2, sd1, sd2, cor, n, X)

# Should return: 
#      Estimate         SE           LL        UL        z     p
# b0 0.50957008 0.13000068  0.254773424 0.7643667 3.919749 0.000
# b1 0.07976238 0.04133414 -0.001251047 0.1607758 1.929697 0.054
#     exp(Estimate)   exp(LL)  exp(UL)
# b0       1.664575 1.2901693 2.147634
# b1       1.083030 0.9987497 1.174422

Meta-regression analysis for 2-group log mean ratios

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a 2-group log mean ratio. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The exponentiated slope estimate for a predictor variable describes a multiplicative change in the mean ratio associated with a 1-unit increase in that predictor variable, controlling for all other predictor variables in the model.

Usage

meta.lm.meanratio2(alpha, m1, m2, sd1, sd2, n1, n2, X)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - the exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

Examples

n1 <- c(65, 30, 29, 45, 50)
n2 <- c(67, 32, 31, 20, 52)
m1 <- c(31.1, 32.3, 31.9, 29.7, 33.0)
m2 <- c(34.1, 33.2, 30.6, 28.7, 26.5)
sd1 <- c(7.1, 8.1, 7.8, 6.8, 7.6)
sd2 <- c(7.8, 7.3, 7.5, 7.2, 6.8)
x1 <- c(4, 6, 7, 7, 8)
X <- matrix(x1, 5, 1)
meta.lm.meanratio2(.05, m1, m2, sd1, sd2, n1, n2, X)

# Should return:
#       Estimate         SE          LL          UL         z p
# b0 -0.40208954 0.09321976 -0.58479692 -0.21938216 -4.313351 0
# b1  0.06831545 0.01484125  0.03922712  0.09740377  4.603078 0
#    exp(Estimate)  exp(LL)   exp(UL)
# b0     0.6689208 0.557219 0.8030148
# b1     1.0707030 1.040007 1.1023054

Meta-regression analysis for odds ratios

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a log odds ratio. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The exponentiated slope estimate for a predictor variable describes a multiplicative change in the odds ratio associated with a 1-unit increase in that predictor variable, controlling for all other predictor variables in the model.

Usage

meta.lm.odds(alpha, f1, f2, n1, n2, X)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - the exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

References

Bonett DG, Price RM (2015). “Varying coefficient meta-analysis methods for odds ratios and risk ratios.” Psychological Methods, 20(3), 394–406. ISSN 1939-1463, doi:10.1037/met0000032.

Examples

n1 <- c(204, 201, 932, 130, 77)
n2 <- c(106, 103, 415, 132, 83)
f1 <- c(24, 40, 93, 14, 5)
f2 <- c(12, 9, 28, 3, 1)
x1 <- c(4, 4, 5, 3, 26)
x2 <- c(1, 1, 1, 0, 0)
X <- matrix(cbind(x1, x2), 5, 2)
meta.lm.odds(.05, f1, f2, n1, n2, X)

# Should return:
#        Estimate         SE           z     p         LL         UL
# b0  1.541895013 0.69815801  2.20851868 0.027  0.1735305 2.91025958
# b1 -0.004417932 0.04840623 -0.09126784 0.927 -0.0992924 0.09045653
# b2 -1.071122269 0.60582695 -1.76803337 0.077 -2.2585213 0.11627674
#    exp(Estimate)   exp(LL)   exp(UL)
# b0     4.6734381 1.1894969 18.361564
# b1     0.9955918 0.9054779  1.094674
# b2     0.3426238 0.1045049  1.123307

Meta-regression analysis for paired-samples proportion differences

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a paired-samples proportion difference. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity.

Usage

meta.lm.prop.ps(alpha, f11, f12, f21, f22, X)

Arguments

alpha

alpha level for 1-alpha confidence

f11

vector of frequency counts in cell 1,1

f12

vector of frequency counts in cell 1,2

f21

vector of frequency counts in cell 2,1

f22

vector of frequency counts in cell 2,2

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG, Price RM (2014). “Meta-analysis methods for risk differences.” British Journal of Mathematical and Statistical Psychology, 67(3), 371–387. ISSN 00071102, doi:10.1111/bmsp.12024.

Examples

f11 <- c(40, 20, 25, 30)
f12 <- c(3, 2, 2, 1)
f21 <- c(7, 6, 8, 6)
f22 <- c(26, 25, 13, 25)
x1 <- c(1, 1, 4, 6)
x2 <- c(1, 1, 0, 0)
X <- matrix(cbind(x1, x2), 4, 2)
meta.lm.prop.ps(.05, f11, f12, f21, f22, X)

# Should return: 
#       Estimate         SE          z     p          LL         UL
# b0 -0.21113402 0.21119823 -0.9996960 0.317 -0.62507494 0.20280690
# b1  0.02185567 0.03861947  0.5659236 0.571 -0.05383711 0.09754845
# b2  0.12575138 0.17655623  0.7122455 0.476 -0.22029248 0.47179524

Meta-regression analysis for 1-group proportions

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a proportion from one group. The estimates are OLS estimates with robust standard errors that accomodate residual heteroscedasticity.

Usage

meta.lm.prop1(alpha, f, n, X)

Arguments

alpha

alpha level for 1-alpha confidence

f

vector of frequency counts

n

vector of sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

f <- c(38, 26, 24, 15, 45, 38)
n <- c(80, 60, 70, 50, 180, 200)
x1 <- c(10, 15, 18, 22, 24, 30)
X <- matrix(x1, 6, 1)
meta.lm.prop1(.05, f, n, X)

# Should return: 
#       Estimate         SE         z p          LL           UL
# b0  0.63262816 0.06845707  9.241239 0  0.49845477  0.766801546
# b1 -0.01510565 0.00290210 -5.205076 0 -0.02079367 -0.009417641

Meta-regression analysis for 2-group proportion differences

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a 2-group proportion difference. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity.

Usage

meta.lm.prop2(alpha, f1, f2, n1, n2, X)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG, Price RM (2014). “Meta-analysis methods for risk differences.” British Journal of Mathematical and Statistical Psychology, 67(3), 371–387. ISSN 00071102, doi:10.1111/bmsp.12024.

Examples

f1 <- c(24, 40, 93, 14, 5)
f2 <- c(12, 9, 28, 3, 1)
n1 <- c(204, 201, 932, 130, 77)
n2 <- c(106, 103, 415, 132, 83)
x1 <- c(4, 4, 5, 3, 26)
x2 <- c(1, 1, 1, 0, 0)
X <- matrix(cbind(x1, x2), 5, 2)
meta.lm.prop2(.05, f1, f2, n1, n2, X)

# Should return:
#        Estimate          SE          z     p          LL          UL
# b0  0.089756283 0.034538077  2.5987632 0.009  0.02206290 0.157449671
# b1 -0.001447968 0.001893097 -0.7648672 0.444 -0.00515837 0.002262434
# b2 -0.034670988 0.034125708 -1.0159786 0.310 -0.10155615 0.032214170

Meta-regression analysis for proportion ratios

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a log proportion ratio. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The exponentiated slope estimate for a predictor variable describes a multiplicative change in the proportion ratio associated with a 1-unit increase in that predictor variable, controlling for all other predictor variables in the model.

Usage

meta.lm.propratio2(alpha, f1, f2, n1, n2, X)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of group 1 frequency counts

f2

vector of group 2 frequency counts

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • exp(Estimate) - the exponentiated estimate

  • exp(LL) - lower limit of the exponentiated confidence interval

  • exp(UL) - upper limit of the exponentiated confidence interval

References

Price RM, Bonett DG (2008). “Confidence intervals for a ratio of two independent binomial proportions.” Statistics in Medicine, 27(26), 5497–5508. ISSN 02776715, doi:10.1002/sim.3376.

Examples

n1 <- c(204, 201, 932, 130, 77)
n2 <- c(106, 103, 415, 132, 83)
f1 <- c(24, 40, 93, 14, 5)
f2 <- c(12, 9, 28, 3, 1)
x1 <- c(4, 4, 5, 3, 26)
x2 <- c(1, 1, 1, 0, 0)
X <- matrix(cbind(x1, x2), 5, 2)
meta.lm.propratio2(.05, f1, f2, n1, n2, X)

# Should return:
#         Estimate         SE           z     p          LL         UL
# b0  1.4924887636 0.69172794  2.15762393 0.031  0.13672691 2.84825062
# b1  0.0005759509 0.04999884  0.01151928 0.991 -0.09741998 0.09857188
# b2 -1.0837844594 0.59448206 -1.82307345 0.068 -2.24894789 0.08137897
#     exp(Estimate)   exp(LL)   exp(UL)
# b0      4.4481522 1.1465150 17.257565
# b1      1.0005761 0.9071749  1.103594
# b2      0.3383128 0.1055102  1.084782

Meta-regression analysis for semipartial correlations

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a Fisher-transformed semipartial correlation. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The correlations are Fisher-transformed and hence the parameter estimates do not have a simple interpretation. However, the hypothesis test results can be used to decide if a population slope is either positive or negative.

Usage

meta.lm.semipart(alpha, n, cor, r2, X)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated semipartial correlations

r2

vector of squared multiple correlations for a model that includes the IV and all control variables

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

n <- c(128, 97, 210, 217)
cor <- c(.35, .41, .44, .39)
r2 <- c(.29, .33, .36, .39)
x1 <- c(18, 25, 23, 19)
X <- matrix(x1, 4, 1)
meta.lm.semipart(.05, n, cor, r2, X)

# Should return: 
#      Estimate        SE         z     p          LL         UL
# b0 0.19695988 0.3061757 0.6432905 0.520 -0.40313339 0.79705315
# b1 0.01055584 0.0145696 0.7245114 0.469 -0.01800004 0.03911172

Meta-regression analysis for Spearman correlations

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a Fisher-transformed Spearman correlation. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. The correlations are Fisher-transformed and hence the parameter estimates do not have a simple interpretation. However, the hypothesis test results can be used to decide if a population slope is either positive or negative.

Usage

meta.lm.spear(alpha, n, cor, X)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated Spearman correlations

X

matrix of predictor values

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

n <- c(150, 200, 300, 200, 350)
cor <- c(.14, .29, .16, .21, .23)
x1 <- c(18, 25, 23, 19, 24)
X <- matrix(x1, 5, 1)
meta.lm.spear(.05, n, cor, X)

# Should return: 
#       Estimate         SE          z     p           LL         UL
# b0 -0.08920088 0.26686388 -0.3342561 0.738 -0.612244475 0.43384271
# b1  0.01370866 0.01190212  1.1517825 0.249 -0.009619077 0.03703639

Meta-regression analysis for paired-samples standardized mean differences

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a paired-samples standardized mean difference. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity.

Usage

meta.lm.stdmean.ps(alpha, m1, m2, sd1, sd2, cor, n, X, stdzr)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for measurement 1

m2

vector of estimated means for measurement 2

sd1

vector of estimated SDs for measurement 1

sd2

vector of estimated SDs for measurement 2

cor

vector of estimated correlations for paired measurements

n

vector of sample sizes

X

matrix of predictor values

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for measurement 1 SD standardizer

  • set to 2 for measurement 2 SD standardizer

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • t - t-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

n <- c(65, 30, 29, 45, 50)
cor <- c(.87, .92, .85, .90, .88)
m1 <- c(20.1, 20.5, 19.3, 21.5, 19.4)
m2 <- c(10.4, 10.2, 8.5, 10.3, 7.8)
sd1 <- c(9.3, 9.9, 10.1, 10.5, 9.8)
sd2 <- c(7.8, 8.0, 8.4, 8.1, 8.7)
x1 <- c(2, 3, 3, 4, 4)
X <- matrix(x1, 5, 1)
meta.lm.stdmean.ps(.05, m1, m2, sd1, sd2, cor, n, X, 0)

# Should return:
#      Estimate         SE         z     p         LL        UL
# b0 1.01740253 0.25361725 4.0115667 0.000  0.5203218 1.5144832
# b1 0.04977943 0.07755455 0.6418635 0.521 -0.1022247 0.2017836

Meta-regression analysis for 2-group standardized mean differences

Description

This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a 2-group standardized mean difference. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity. Use the unweighted variance standardizer for 2-group experimental designs, and use the weighted variance standardizer for 2-group nonexperimental designs. A single-group standardizer can be used in either experimental or nonexperimental designs.

Usage

meta.lm.stdmean2(alpha, m1, m2, sd1, sd2, n1, n2, X, stdzr)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

X

matrix of predictor values

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for group 1 SD standardizer

  • set to 2 for group 2 SD standardizer

  • set to 3 for square root weighted average variance standardizer

Value

Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:

  • Estimate - OLS estimate

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

n1 <- c(65, 30, 29, 45, 50)
n2 <- c(67, 32, 31, 20, 52)
m1 <- c(31.1, 32.3, 31.9, 29.7, 33.0)
m2 <- c(34.1, 33.2, 30.6, 28.7, 26.5)
sd1 <- c(7.1, 8.1, 7.8, 6.8, 7.6)
sd2 <- c(7.8, 7.3, 7.5, 7.2, 6.8)
x1 <- c(4, 6, 7, 7, 8)
X <- matrix(x1, 5, 1)
meta.lm.stdmean2(.05, m1, m2, sd1, sd2, n1, n2, X, 0)

# Should return:
#      Estimate        SE         z p         LL         UL
# b0 -1.6988257 0.4108035 -4.135373 0 -2.5039857 -0.8936657
# b1  0.2871641 0.0649815  4.419167 0  0.1598027  0.4145255

Confidence interval for a subgroup difference in average Pearson or partial correlations

Description

Computes the estimate, standard error, and confidence interval for a difference in average Pearson or partial correlations for two mutually exclusive subgroups of studies. Each subgroup can have one or more studies. All of the correlations must be either Pearson correlations or partial correlations.

Usage

meta.sub.cor(alpha, n, cor, s, group)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated correlations

s

number of control variables (set to 0 for Pearson)

group

vector of group indicators:

  • 1 for set A

  • 2 for set B

  • 0 to ignore

Value

Returns a matrix with three rows:

  • Row 1 - estimate for Set A

  • Row 2 - estimate for Set B

  • Row 3 - estimate for difference, Set A - Set B

The columns are:

  • Estimate - estimated average correlation or difference

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2008). “Meta-analytic interval estimation for bivariate correlations.” Psychological Methods, 13(3), 173–181. ISSN 1939-1463, doi:10.1037/a0012868.

Examples

n <- c(55, 190, 65, 35)
cor <- c(.40, .65, .60, .45)
group <- c(1, 1, 2, 0)
meta.sub.cor(.05, n, cor, 0, group)

# Should return:
#                Estimate         SE         LL        UL
# Set A:            0.525 0.06195298  0.3932082 0.6356531
# Set B:            0.600 0.08128008  0.4171458 0.7361686
# Set A - Set B:   -0.075 0.10219894 -0.2645019 0.1387283

Confidence interval for a subgroup difference in average Cronbach reliabilities

Description

Computes the estimate, standard error, and confidence interval for a difference in average Cronbach reliability coefficients for two mutually exclusive subgroups of studies. Each set can have one or more studies. The number of measurements used to compute the sample reliablity coefficient is assumed to be the same for all studies.

Usage

meta.sub.cronbach(alpha, n, rel, r, group)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

rel

vector of estimated Cronbach reliabilities

r

number of measurements (e.g., items)

group

vector of group indicators:

  • 1 for set A

  • 2 for set B

  • 0 to ignore

Value

Returns a matrix with three rows:

  • Row 1 - estimate for Set A

  • Row 2 - estimate for Set B

  • Row 3 - estimate for difference, Set A - Set B

The columns are:

  • Estimate - estimated average correlation or difference

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2010). “Varying coefficient meta-analytic methods for alpha reliability.” Psychological Methods, 15(4), 368–385. ISSN 1939-1463, doi:10.1037/a0020142.

Examples

n <- c(120, 170, 150, 135)
rel <- c(.89, .87, .73, .71)
group <- c(1, 1, 2, 2)
r <- 10
meta.sub.cronbach(.05, n, rel, r, group)

# Should return: 
#                Estimate         SE        LL        UL
# Set A:             0.88 0.01068845 0.8581268 0.8999386
# Set B:             0.72 0.02515130 0.6684484 0.7668524
# Set A - Set B:     0.16 0.02732821 0.1082933 0.2152731

Confidence interval for a subgroup difference in average effect size

Description

Computes the estimate, standard error, and confidence interval for a difference in the average effect size (any type of effect size) for two mutually exclusive subgroups of studies. Each subgroup can have one or more studies. All of the effects sizes should be compatible.

Usage

meta.sub.gen(alpha, est, se, group)

Arguments

alpha

alpha level for 1-alpha confidence

est

vector of estimated effect sizes

se

vector of effect size standard errors

group

vector of group indicators:

  • 1 for set A

  • 2 for set B

  • 0 to ignore

Value

Returns a matrix with three rows:

  • Row 1 - estimate for Set A

  • Row 2 - estimate for Set B

  • Row 3 - estimate for difference, Set A - Set B

The columns are:

  • Estimate - estimated average effect size or difference

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

est <- c(.920, .896, .760, .745)
se <- c(.098, .075, .069, .055) 
group <- c(1, 1, 2, 2)
meta.sub.gen(.05, est, se, group)

# Should return:
#                Estimate         SE          LL        UL
# Set A:           0.9080 0.06170292 0.787064504 1.0289355
# Set B:           0.7525 0.04411916 0.666028042 0.8389720
# Set A - Set B:   0.1555 0.07585348 0.006829917 0.3041701

Confidence interval for a subgroup difference in average point-biserial correlations

Description

Computes the estimate, standard error, and confidence interval for a difference in average point-biserial correlations for two mutually exclusive subgroups of studies. Each subgroup can have one or more studies. Two types of point-biserial correlations can be analyzed. One type uses an unweighted variance and is recommended for 2-group experimental designs. The other type uses a weighted variance and is recommended for 2-group nonexperimental designs with simple random sampling (but not stratified random sampling) within each study. Equality of variances within or across studies is not assumed.

Usage

meta.sub.pbcor(alpha, m1, m2, sd1, sd2, n1, n2, type, group)

Arguments

alpha

alpha level for 1-alpha confidence

m1

vector of estimated means for group 1

m2

vector of estimated means for group 2

sd1

vector of estimated SDs for group 1

sd2

vector of estimated SDs for group 2

n1

vector of group 1 sample sizes

n2

vector of group 2 sample sizes

type
  • set to 1 for weighted variance

  • set to 2 for unweighted variance

group

vector of group indicators:

  • 1 for set A

  • 2 for set B

  • 0 to ignore

Value

Returns a matrix with three rows:

  • Row 1 - estimate for Set A

  • Row 2 - estimate for Set B

  • Row 3 - estimate for difference, Set A - Set B

The columns are:

  • Estimate - estimated average correlation or difference

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2020). “Point-biserial correlation: Interval estimation, hypothesis testing, meta-analysis, and sample size determination.” British Journal of Mathematical and Statistical Psychology, 73(S1), 113–144. ISSN 0007-1102, doi:10.1111/bmsp.12189.

Examples

m1 <- c(45.1, 39.2, 36.3, 34.5)
m2 <- c(30.0, 35.1, 35.3, 36.2)
sd1 <- c(10.7, 10.5, 9.4, 11.5)
sd2 <- c(12.3, 12.0, 10.4, 9.6)
n1 <- c(40, 20, 50, 25)
n2 <- c(40, 20, 48, 26)
group <- c(1, 1, 2, 2)
meta.sub.pbcor(.05,  m1, m2, sd1, sd2, n1, n2, 2, group)

# Should return:
#                   Estimate         SE         LL        UL
# Set A:          0.36338772 0.08552728  0.1854777 0.5182304
# Set B:         -0.01480511 0.08741322 -0.1840491 0.1552914
# Set A - Set B:  0.37819284 0.12229467  0.1320530 0.6075828

Confidence interval for a subgroup difference in average semipartial correlations

Description

Computes the estimate, standard error, and confidence interval for a difference in average semipartial correlations for two subgroups of mutually exclusive studies. Each subgroup can have one or more studies.

Usage

meta.sub.semipart(alpha, n, cor, r2, group)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated semi-partial correlations

r2

vector of squared multiple correlations for a model that includes the IV and all control variables

group

vector of group indicators:

  • 1 for set A

  • 2 for set B

  • 0 to ignore

Value

Returns a matrix with three rows:

  • Row 1 - estimate for Set A

  • Row 2 - estimate for Set B

  • Row 3 - estimate for difference, Set A - Set B

The columns are:

  • Estimate - estimated average correlation or difference

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Examples

n <- c(55, 190, 65, 35)
cor <- c(.40, .65, .60, .45)
r2 <- c(.25, .41, .43, .39)
group <- c(1, 1, 2, 0)	
meta.sub.semipart(.05, n, cor, r2, group)

# Should return:
#                Estimate         SE         LL        UL
# Set A:            0.525 0.05955276  0.3986844 0.6317669
# Set B:            0.600 0.07931155  0.4221127 0.7333949
# Set A - Set B:   -0.075 0.09918091 -0.2587113 0.1324682

Confidence interval for a subgroup difference in average Spearman correlations

Description

Computes the estimate, standard error, and confidence interval for a difference in average Spearman correlations for two mutually exclusive subgroups of studies. Each subgroup can have one or more studies.

Usage

meta.sub.spear(alpha, n, cor, group)

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated Spearman correlations

group

vector of group indicators:

  • 1 for set A

  • 2 for set B

  • 0 to ignore

Value

Returns a matrix with three rows:

  • Row 1 - estimate for Set A

  • Row 2 - estimate for Set B

  • Row 3 - estimate for difference, Set A - Set B

The columns are:

  • Estimate - estimated average correlation or difference

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2008). “Meta-analytic interval estimation for bivariate correlations.” Psychological Methods, 13(3), 173–181. ISSN 1939-1463, doi:10.1037/a0012868.

Examples

n <- c(55, 190, 65, 35)
cor <- c(.40, .65, .60, .45)
group <- c(1, 1, 2, 0)
meta.sub.spear(.05, n, cor, group)

# Should return:
#                Estimate         SE         LL        UL
# Set A:            0.525 0.06483629  0.3865928 0.6402793
# Set B:            0.600 0.08829277  0.3992493 0.7458512
# Set A - Set B:   -0.075 0.10954158 -0.2760700 0.1564955

Compares and combines Pearson or partial correlations in original and follow-up studies

Description

This function can be used to compare and combine Pearson or partial correlations from an original study and a follow-up study. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.cor(alpha, cor1, n1, cor2, n2, s)

Arguments

alpha

alpha level for 1-alpha confidence

cor1

estimated correlation in original study

n1

sample size in original study

cor2

estimated correlation in follow-up study

n2

sample size in follow-up study

s

number of control variables in each study (0 for Pearson)

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in correlations

  • Row 4 estimates the average correlation

The columns are:

  • Estimate -correlation estimate (single study, difference, average)

  • SE - standard error

  • z - t-value for rows 1 and 2; z-value for rows 3 and 4

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.cor(.05, .598, 80, .324, 200, 0)

# Should return:
#                       Estimate         SE        z            p        LL        UL
# Original:                0.598 0.07320782 6.589418 4.708045e-09 0.4355043 0.7227538
# Follow-up:               0.324 0.06376782 4.819037 2.865955e-06 0.1939787 0.4428347
# Original - Follow-up:    0.274 0.09708614 2.633335 8.455096e-03 0.1065496 0.4265016
# Average:                 0.461 0.04854307 7.634998 2.264855e-14 0.3725367 0.5411607

Compares and combines any type of correlation in original and follow-up studies

Description

This function can be used to compare and combine any type of correlation from an original study and a follow-up study. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.cor.gen(alpha, cor1, se1, cor2, se2)

Arguments

alpha

alpha level for 1-alpha confidence

cor1

estimated correlation in original study

se1

standard error of correlation in original study

cor2

estimated correlation in follow-up study

se2

standard error of correlation in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in correlations

  • Row 4 estimates the average correlation

The columns are:

  • Estimate - correlation estimate (single study, difference, average)

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.cor.gen(.05, .454, .170, .318, .098)

# Should return:
#                       Estimate         SE         z            p          LL        UL
# Original:                0.454 0.17000000 2.2869806 0.0221969560  0.06991214 0.7208577
# Follow-up:               0.318 0.09800000 3.0215123 0.0025151541  0.11522137 0.4953353
# Original - Follow-up:    0.136 0.19622436 0.6671281 0.5046902807 -0.21543667 0.4237240
# Average:                 0.386 0.09811218 3.4089419 0.0006521538  0.19606750 0.5480170

Compares and combines effect sizes in original and follow-up studies

Description

This function can be used to compare and combine any effect size using the effect size estimate and its standard error from the original study and the follow-up study. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.gen(alpha, est1, se1, est2, se2)

Arguments

alpha

alpha level for 1-alpha confidence

est1

estimated effect size in original study

se1

effect size standard error in original study

est2

estimated effect size in follow-up study

se2

effect size standard error in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in effect sizes

  • Row 4 estimates the average effect size

Columns are:

  • Estimate - effect size estimate (single study, difference, average)

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.gen(.05, .782, .210, .650, .154)

# Should return: 
#                      Estimate        SE         z            p         LL        UL
#  Original:              0.782 0.2100000 3.7238095 1.962390e-04  0.3704076 1.1935924
#  Follow-up:             0.650 0.1540000 4.2207792 2.434593e-05  0.3481655 0.9518345
#  Original - Follow-up:  0.132 0.2604151 0.5068831 6.122368e-01 -0.2963446 0.5603446
#  Average:               0.716 0.1302075 5.4989141 3.821373e-08  0.4607979 0.9712021

Compares and combines paired-samples mean differences in original and follow-up studies

Description

This function computes confidence intervals from an original study and a follow-up study where the effect size is a paired-samples mean difference. Confidence intervals for the difference and average effect size are also computed. Equality of variances within or across studies is not assumed. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence intervals for the difference and average. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.mean.ps(
  alpha,
  m11,
  m12,
  sd11,
  sd12,
  cor1,
  n1,
  m21,
  m22,
  sd21,
  sd22,
  cor2,
  n2
)

Arguments

alpha

alpha level for 1-alpha confidence

m11

estimated mean for measurement 1 in original study

m12

estimated mean for measurement 2 in original study

sd11

estimated SD for measurement 1 in original study

sd12

estimated SD for measurement 2 in original study

cor1

estimated correlation of paired measurements in orginal study

n1

sample size in original study

m21

estimated mean for measurement 1 in follow-up study

m22

estimated mean for measurement 2 in follow-up study

sd21

estimated SD for measurement 1 in follow-up study

sd22

estimated SD for measurement 2 in follow-up study

cor2

estimated correlation of paired measurements in follow-up study

n2

sample size in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in mean differences

  • Row 4 estimates the average mean difference

The columns are:

  • Estimate - mean difference estimate (single study, difference, average)

  • SE - standard error

  • df - degrees of freedom

  • t - t-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.mean.ps(.05, 86.22, 70.93, 14.89, 12.32, .765, 20, 
                       84.81, 77.24, 15.68, 16.95, .702, 75)

#  Should return:
#                     Estimate       SE        t            p  
# Original:              15.29 2.154344 7.097288 9.457592e-07 
# Follow-up:              7.57 1.460664 5.182575 1.831197e-06 
# Original - Follow-up:   7.72 2.602832 2.966000 5.166213e-03 
# Average:               11.43 1.301416 8.782740 1.010232e-10 
#                              LL       UL       df
# Original:             10.780906 19.79909 19.00000
# Follow-up:             4.659564 10.48044 74.00000
# Original - Follow-up:  3.332885 12.10712 38.40002
# Average:               8.796322 14.06368 38.40002

Compares and combines single mean in original and follow-up studies

Description

This function computes confidence intervals for a single mean from an original study and a follow-up study. Confidence intervals for the difference between the two means and average of the two means are also computed. Equality of variances across studies is not assumed. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence intervals for the difference and average. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.mean1(alpha, m1, sd1, n1, m2, sd2, n2)

Arguments

alpha

alpha level for 1-alpha confidence

m1

estimated mean in original study

sd1

estimated SD in original study

n1

sample size in original study

m2

estimated mean in follow-up study

sd2

estimated SD in follow-up study

n2

sample size for in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in means

  • Row 4 estimates the average mean

The columns are:

  • Estimate - mean estimate (single study, difference, average)

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.mean1(.05, 21.9, 3.82, 40, 25.2, 3.98, 75)

# Should return:
#                       Estimate        SE        LL        UL       df
# Original:                21.90 0.6039950 20.678305 23.121695 39.00000
# Follow-up:               25.20 0.4595708 24.284285 26.115715 74.00000
# Original - Follow-up:    -3.30 0.7589567 -4.562527 -2.037473 82.63282
# Average:                 23.55 0.3794784 22.795183 24.304817 82.63282

Compares and combines 2-group mean differences in original and follow-up studies

Description

This function computes confidence intervals from an original study and a follow-up study where the effect size is a 2-group mean difference. Confidence intervals for the difference and average effect size are also computed. Equality of variances within or across studies is not assumed. A Satterthwaite adjustment to the degrees of freedom is used to improve the accuracy of the confidence intervals. The same results can be obtained using the meta.lc.mean2 function with appropriate contrast coefficients. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.mean2(
  alpha,
  m11,
  m12,
  sd11,
  sd12,
  n11,
  n12,
  m21,
  m22,
  sd21,
  sd22,
  n21,
  n22
)

Arguments

alpha

alpha level for 1-alpha confidence

m11

estimated mean for group 1 in original study

m12

estimated mean for group 2 in original study

sd11

estimated SD for group 1 in original study

sd12

estimated SD for group 2 in original study

n11

sample size for group 1 in original study

n12

sample size for group 2 in original study

m21

estimated mean for group 1 in follow-up study

m22

estimated mean for group 2 in follow-up study

sd21

estimated SD for group 1 in follow-up study

sd22

estimated SD for group 2 in follow-up study

n21

sample size for group 1 in follow-up study

n22

sample size for group 2 in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in mean differences

  • Row 4 estimates the average mean difference

The columns are:

  • Estimate - mean difference estimate (single study, difference, average)

  • SE - standard error

  • t - t-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.mean2(.05, 21.9, 16.1, 3.82, 3.21, 40, 40, 
                     25.2, 19.1, 3.98, 3.79, 75, 75)

# Should return:
#                     Estimate        SE          t            p 
# Original:               5.80 0.7889312  7.3517180 1.927969e-10  
# Follow-up:              6.10 0.6346075  9.6122408 0.000000e+00  
# Original - Follow-up:  -0.30 1.0124916 -0.2962988 7.673654e-01 
# Average:                5.95 0.5062458 11.7531843 0.000000e+00 
#                               LL       UL        df
# Original:               4.228624 7.371376  75.75255
# Follow-up:              4.845913 7.354087 147.64728
# Original - Follow-up:  -1.974571 1.374571 169.16137
# Average:                4.950627 6.949373 169.16137

Compares and combines odds ratios in original and follow-up studies

Description

This function computes confidence intervals for an odds ratio from an original study and a follow-up study. Confidence intervals for the ratio of odds ratios and geometric average odds ratio are also computed. The confidence level for the ratio of ratios is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.oddsratio(alpha, est1, se1, est2, se2)

Arguments

alpha

alpha level for 1-alpha confidence

est1

estimate of log odds ratio in original study

se1

standard error of log odds ratio in original study

est2

estimate of log odds ratio in follow-up study

se2

standard error of log odds ratio in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the ratio of odds ratios

  • Row 4 estimates the geometric average odds ratio

The columns are:

  • Estimate - odds ratio estimate (single study, ratio, average)

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - exponentiated lower limit of the confidence interval

  • UL - exponentiated upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.oddsratio(.05, 1.39, .302, 1.48, .206)

# Should return:
#                          Estimate        SE          z            p
# Original:              1.39000000 0.3020000  4.6026490 4.171509e-06
# Follow-up:             1.48000000 0.2060000  7.1844660 6.747936e-13
# Original/Follow-up:   -0.06273834 0.3655681 -0.1716188 8.637372e-01
# Average:               0.36067292 0.1827840  1.9732190 4.847061e-02
#                         exp(LL)  exp(UL)
# Original:             2.2212961 7.256583
# Follow-up:            2.9336501 6.578144
# Original/Fllow-up:    0.5147653 1.713551
# Average:              1.0024257 2.052222

Plot to compare estimates from original and follow-up studies

Description

Generates a basic plot using ggplot2 to visualize the estimates from and original and follow-up studies.

Usage

replicate.plot(
  result,
  focus = c("Both", "Difference", "Average"),
  reference_line = NULL,
  diamond_height = 0.2,
  difference_axis_ticks = 5,
  ggtheme = ggplot2::theme_classic()
)

Arguments

result
  • a result matrix from any of the replicate functions in vcmeta

focus
  • Optional specification of the focus of the plot; defaults to 'Both'

  • Both - plots each estimate, differencence, and average

  • Difference - plot each estimate and difference between them

  • Average - plot each estimate and the average effect size

reference_line
  • Optional x-value for a reference line. Only applies if focus is 'Difference' or 'Both'. Defaults to NULL, in which case a reference line is not drawn.

diamond_height
  • Optional height of the diamond representing average effect size. Only applies if focus is 'Average' or 'Both'. Defaults to 0.2

difference_axis_ticks
  • Optional requested number of ticks on the difference axis. Only applies if focus is 'Difference' or 'Both'. Defaults to 5.

ggtheme
  • optional ggplot2 theme object; defaults to theme_classic()

Value

Returns a ggplot object. If stored, can be further customized via the ggplot API

Examples

# Compare Damisch et al., 2010 to Calin-Jageman & Caldwell 2014
# Damisch et al., 2010, Exp 1, German participants made 10 mini-golf putts.
# Half were told they had a 'lucky' golf ball; half were not.
# Found a large but uncertain improvement in shots made in the luck condition
# Calin-Jageman & Caldwell, 2014, Exp 1, was a pre-registered replication with
# input from Damisch, though with English-speaking participants.
#
# Here we compare the effect sizes, in original units, for the two studies.
# Use the replicate.mean2 function because the design is a 2-group design.

library(ggplot2)
damisch_v_calinjageman_raw <- replicate.mean2(
  alpha = 0.05,
  m11 = 6.42,
  m12 = 4.75,
  sd11 = 1.88,
  sd12 = 2.15,
  n11 = 14,
  n12 = 14,
  m21 = 4.73,
  m22 = 4.62,
  sd21 = 1.958,
  sd22 = 2.12,
  n21 = 66,
  n22 = 58
)

# View the comparison:
damisch_v_calinjageman_raw


# Now plot the comparison, focusing on the difference
replicate.plot(damisch_v_calinjageman_raw, focus = "Difference")

# Plot the comparison, focusing on the average
replicate.plot(damisch_v_calinjageman_raw, 
  focus = "Average", 
  reference_line = 0,
  diamond_height = 0.1
)


# Plot the comparison with both difference and average.
# In this case, store the plot for manipulation
myplot <- replicate.plot(
  damisch_v_calinjageman_raw,
  focus = "Both",
  reference_line = 0
)

# View the stored plot
myplot

# Change x-labels and study labels
myplot <- myplot + xlab("Difference in Putts Made, Lucky - Control")
myplot <- myplot + scale_y_discrete(
    labels = c(
      "Average",
      "Difference",
      "Calin-Jageman & Caldwell, 2014",
      "Damisch et al., 2010"
      )
  )
  
# View the updated plot
myplot

Compares and combines paired-samples proportion differences in original and follow-up studies

Description

This function computes confidence intervals from an original study and a follow-up study where the effect size is a paired-samples proportion difference. Confidence intervals for the difference and average of effect sizes are also computed. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.prop.ps(alpha, f1, f2)

Arguments

alpha

alpha level for 1-alpha confidence

f1

vector of frequency counts for 2x2 table in original study

f2

vector of frequency counts for 2x2 table in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in proportion differences

  • Row 4 estimates the average proportion difference

The columns are:

  • Estimate - proportion difference estimate (single study, difference, average)

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

f1 <- c(42, 2, 15, 61)
f2 <- c(69, 5, 31, 145)
replicate.prop.ps(.05, f1, f2)

# Should return:
#                           Estimate         SE           z            p
# Original:              0.106557377 0.03440159  3.09745539 1.951898e-03
# Follow-up:             0.103174603 0.02358274  4.37500562 1.214294e-05
# Original - Follow-up:  0.003852359 0.04097037  0.09402793 9.250870e-01
# Average:               0.105511837 0.02048519  5.15064083 2.595979e-07
#                                LL         UL
# Original:              0.03913151 0.17398325
# Follow-up:             0.05695329 0.14939592
# Original - Follow-up: -0.06353791 0.07124263
# Average:               0.06536161 0.14566206

Compares and combines single proportion in original and follow-up studies

Description

This function computes confidence intervals for a single proportion from an original study and a follow-up study. Confidence intervals for the difference between the two proportions and average of the two proportions are also computed. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.prop1(alpha, f1, n1, f2, n2)

Arguments

alpha

alpha level for 1-alpha confidence

f1

frequency count in original study

n1

sample size in original study

f2

frequency count in follow-up study

n2

sample size for in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in proportions

  • Row 4 estimates the average proportion

The columns are:

  • Estimate - proportion estimate (single study, difference, average)

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.prop1(.05, 21, 300, 35, 400)

# Should return:
#                          Estimate         SE          LL         UL
# Original:              0.07565789 0.01516725  0.04593064 0.10538515
# Follow-up:             0.09158416 0.01435033  0.06345803 0.11971029
# Original - Follow-up: -0.01670456 0.02065098 -0.05067239 0.01726328
# Average:               0.08119996 0.01032549  0.06096237 0.10143755

Compares and combines 2-group proportion differences in original and follow-up studies

Description

This function computes confidence intervals from an original study and a follow-up study where the effect size is a 2-group proportion difference. Confidence intervals for the difference and average effect size are also computed. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.prop2(alpha, f11, f12, n11, n12, f21, f22, n21, n22)

Arguments

alpha

alpha level for 1-alpha confidence

f11

frequency count for group 1 in original study

f12

frequency count for group 2 in original study

n11

sample size for group 1 in original study

n12

sample size for group 2 in original study

f21

frequency count for group 1 in follow-up study

f22

frequency count for group 2 in follow-up study

n21

sample size for group 1 in follow-up study

n22

sample size for group 2 in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in proportion differences

  • Row 4 estimates the average proportion difference

The columns are:

  • Estimate - proportion difference estimate (single study, difference, average)

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.prop2(.05, 21, 16, 40, 40, 19, 13, 60, 60)

# Should return:
#                         Estimate         SE         z         p
# Original:             0.11904762 0.10805233 1.1017590 0.2705665
# Follow-up:            0.09677419 0.07965047 1.2149858 0.2243715
# Original - Follow-up: 0.02359056 0.13542107 0.1742016 0.8617070
# Average:              0.11015594 0.06771053 1.6268656 0.1037656
#                                LL        UL
# Original:             -0.09273105 0.3308263
# Follow-up:            -0.05933787 0.2528863
# Original - Follow-up: -0.19915727 0.2463384
# Average:              -0.02255427 0.2428661

Compares and combines 2-group proportion ratios in original and follow-up studies

Description

This function computes confidence intervals from an original study and a follow-up study where the effect size is a 2-group proportion ratio. Confidence intervals for the ratio and geometric average of effect sizes are also computed. The confidence level for the ratio of ratios is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.ratio.prop2(alpha, f11, f12, n11, n12, f21, f22, n21, n22)

Arguments

alpha

alpha level for 1-alpha confidence

f11

frequency count for group 1 in original study

f12

frequency count for group 2 in original study

n11

sample size for group 1 in original study

n12

sample size for group 2 in original study

f21

frequency count for group 1 in follow-up study

f22

frequency count for group 2 in follow-up study

n21

sample size for group 1 in follow-up study

n22

sample size for group 2 in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the ratio of proportion ratios

  • Row 4 estimates the geometric average proportion ratio

The columns are:

  • Estimate - proportion difference estimate (single study, ratio, average)

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.ratio.prop2(.05, 21, 16, 40, 40, 19, 13, 60, 60)

# Should return:
#                      Estimate        LL       UL
# Original:           1.3076923 0.8068705 2.119373
# Follow-up:          1.4528302 0.7939881 2.658372
# Original/Follow-up: 0.9000999 0.4703209 1.722611
# Average:            1.3783522 0.9362893 2.029132

Compares and combines slope coefficients in original and follow-up studies

Description

This function computes confidence intervals for a slope from the original and follow-up studies, the difference in slopes, and the average of the slopes. Equality of error variances across studies is not assumed. The confidence interval for the difference uses a 1 - 2*alpha confidence level, which is recommended for equivalence testing. Use the replicate.gen function for slopes in other types of models (e.g., binary logistic, ordinal logistic, SEM).

Usage

replicate.slope(alpha, b1, se1, n1, b2, se2, n2, s)

Arguments

alpha

alpha level for 1-alpha or 1 - 2alpha confidence

b1

sample slope in original study

se1

standard error of slope in original study

n1

sample size in original study

b2

sample slope in follow-up study

se2

standard error of slope in follow-up study

n2

sample size in follow-up study

s

number of predictor variables in model

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in slopes

  • Row 4 estimates the average slope

The columns are:

  • Estimate - slope estimate (single study, difference, average)

  • SE - standard error

  • t - t-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

  • df - degrees of freedom

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.slope(.05, 23.4, 5.16, 50, 18.5, 4.48, 90, 4)

# Should return: 
#                       Estimate       SE         t            p
# Original:                23.40 5.160000 4.5348837 4.250869e-05
# Follow-up:               18.50 4.480000 4.1294643 8.465891e-05
# Original - Follow-up:     4.90 6.833447 0.7170612 4.749075e-01
# Average:                 20.95 3.416724 6.1316052 1.504129e-08
#                              LL       UL       df
# Original:             13.007227 33.79277  45.0000
# Follow-up:             9.592560 27.40744  85.0000
# Original - Follow-up: -6.438743 16.23874 106.4035
# Average:              14.176310 27.72369 106.4035

Compares and combines Spearman correlations in original and follow-up studies

Description

This function can be used to compare and combine Spearman correlations from an original study and a follow-up study. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing.

Usage

replicate.spear(alpha, cor1, n1, cor2, n2)

Arguments

alpha

alpha level for 1-alpha confidence

cor1

estimated Spearman correlation in original study

n1

sample size in original study

cor2

estimated Spearman correlation in follow-up study

n2

sample size in follow-up study

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in correlations

  • Row 4 estimates the average correlation

The columns are:

  • Estimate - Spearman correlation estimate (single study, difference, average)

  • SE - standard error

  • z - z-value

  • p - p-value

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.spear(.05, .598, 80, .324, 200)

# Should return:
#                       Estimate         SE        z            p         LL        UL
# Original:                0.598 0.07948367 5.315140 1.065752e-07 0.41985966 0.7317733
# Follow-up:               0.324 0.06541994 4.570582 4.863705e-06 0.19049455 0.4457384
# Original - Follow-up:    0.274 0.10294378 3.437975 5.860809e-04 0.09481418 0.4342171
# Average:                 0.461 0.05147189 9.967944 0.000000e+00 0.36695230 0.5457190

Compares and combines paired-samples standardized mean differences in original and follow-up studies

Description

This function computes confidence intervals from an original study and a follow-up study where the effect size is a paired-samples standardized mean difference. Confidence intervals for the difference and average effect size are also computed. Equality of variances within or across studies is not assumed. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing. Square root unweighted variances and single-condition standard deviation are options for the standardizer.

Usage

replicate.stdmean.ps(
  alpha,
  m11,
  m12,
  sd11,
  sd12,
  cor1,
  n1,
  m21,
  m22,
  sd21,
  sd22,
  cor2,
  n2,
  stdzr
)

Arguments

alpha

alpha level for 1-alpha confidence

m11

estimated mean for group 1 in original study

m12

estimated mean for group 2 in original study

sd11

estimated SD for group 1 in original study

sd12

estimated SD for group 2 in original study

cor1

estimated correlation of paired observations in orginal study

n1

sample size in original study

m21

estimated mean for group 1 in follow-up study

m22

estimated mean for group 2 in follow-up study

sd21

estimated SD for group 1 in follow-up study

sd22

estimated SD for group 2 in follow-up study

cor2

estimated correlation of paired observations in follow-up study

n2

sample size in follow-up study

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for measurement 1 SD standardizer

  • set to 2 for measurement 2 SD standardizer

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in standardized mean differences

  • Row 4 estimates the average standardized mean difference

The columns are:

  • Estimate - standardized mean difference estimate (single study, difference, average)

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.stdmean.ps(alpha = .05, 86.22, 70.93, 14.89, 12.32, .765, 20, 
                                  84.81, 77.24, 15.68, 16.95, .702, 75, 0)

# Should return:
#                         Estimate         SE        LL        UL
#  Orginal:              1.0890300 0.22915553 0.6697353 1.5680085
#  Follow-up:            0.4604958 0.09590506 0.2756687 0.6516096
#  Original - Follow-up: 0.6552328 0.24841505 0.2466264 1.0638392
#  Average:              0.7747629 0.12420752 0.5313206 1.0182052

Compares and combines 2-group standardized mean differences in original and follow-up studies

Description

This function computes confidence intervals from an original study and a follow-up study where the effect size is a 2-group standardized mean difference. Confidence intervals for the difference and average effect size are also computed. Equality of variances within or across studies is not assumed. The confidence level for the difference is 1 – 2*alpha, which is recommended for equivalence testing. Square root unweighted variances, square root weighted variances, and single-group standard deviation are options for the standardizer.

Usage

replicate.stdmean2(
  alpha,
  m11,
  m12,
  sd11,
  sd12,
  n11,
  n12,
  m21,
  m22,
  sd21,
  sd22,
  n21,
  n22,
  stdzr
)

Arguments

alpha

alpha level for 1-alpha confidence

m11

estimated mean for group 1 in original study

m12

estimated mean for group 2 in original study

sd11

estimated SD for group 1 in original study

sd12

estimated SD for group 2 in original study

n11

sample size for group 1 in original study

n12

sample size for group 2 in original study

m21

estimated mean for group 1 in follow-up study

m22

estimated mean for group 2 in follow-up study

sd21

estimated SD for group 1 in follow-up study

sd22

estimated SD for group 2 in follow-up study

n21

sample size for group 1 in follow-up study

n22

sample size for group 2 in follow-up study

stdzr
  • set to 0 for square root unweighted average variance standardizer

  • set to 1 for group 1 SD standardizer

  • set to 2 for group 2 SD standardizer

  • set to 3 for square root weighted average variance standardizer

Value

A 4-row matrix. The rows are:

  • Row 1 summarizes the original study

  • Row 2 summarizes the follow-up study

  • Row 3 estimates the difference in standardized mean differences

  • Row 4 estimates the average standardized mean difference

The columns are:

  • Estimate - standardized mean difference estimate (single study, difference, average)

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

Bonett DG (2021). “Design and analysis of replication studies.” Organizational Research Methods, 24(3), 513–529. ISSN 1094-4281, doi:10.1177/1094428120911088.

Examples

replicate.stdmean2(.05, 21.9, 16.1, 3.82, 3.21, 40, 40, 
                        25.2, 19.1, 3.98, 3.79, 75, 75, 0)

# Should return: 
#                           Estimate        SE         LL        UL
#  Original:              1.62803662 0.2594668  1.1353486 2.1524396
#  Follow-up:             1.56170447 0.1870576  1.2030461 1.9362986
#  Original - Follow-up:  0.07422178 0.3198649 -0.4519092 0.6003527
#  Average:               1.59487055 0.1599325  1.2814087 1.9083324

Computes the standard error for the average of two Pearson correlations with no variables in common that have been estimated from the same sample

Description

In a study that reports the sample size and six correlations (cor12, cor34, cor13, cor14, cor23, and cor24) where variables 1 and 3 are different measurements of one attribute and variables 2 and 4 are different measurements of a second attribute, this function can be used to compute the average of cor12 and cor34 and its standard error. Note that cor12 and cor34 have no variable in common (i.e., no "overlapping" variable). The average correlation and the standard error from this function can be used as input in the meta.ave.cor.gen function in a meta-analysis where some studies have reported cor12 and other studies have reported cor34.

Usage

se.ave.cor.nonover(cor12, cor34, cor13, cor14, cor23, cor24, n)

Arguments

cor12

estimated correlation between variables 1 and 2

cor34

estimated correlation between variables 3 and 4

cor13

estimated correlation between variables 1 and 3

cor14

estimated correlation between variables 1 and 4

cor23

estimated correlation between variables 2 and 3

cor24

estimated correlation between variables 2 and 4

n

sample size

Value

Returns a two-row matrix. The first row gives results for the average correlation and the second row gives the results with a Fisher transformation. The columns are:

  • Estimate - estimated average of cor12 and cor34

  • SE - standard error

  • VAR(cor12) - variance of cor12

  • VAR(cor34) - variance of cor34

  • COV(cor12,cor34) - covariance of cor12 and cor34

Examples

se.ave.cor.nonover(.357, .398, .755, .331, .347, .821, 100)

# Should return:
#               Estimate         SE VAR(cor12)  VAR(cor34) COV(cor12,cor34)
# Correlation:  0.377500 0.07768887 0.00784892 0.007301895      0.004495714
# Fisher:       0.397141 0.09059993 0.01030928 0.010309278      0.006122153

Computes the standard error for the average of two Pearson correlations with one variable in common that have been estimated from the same sample

Description

In a study that reports the sample size and three correlations (cor12, cor13, and cor23 where variable 1 is called the "overlapping" variable), and variables 2 and 3 are different measurements of the same attribute, this function can be used to compute the average of cor12 and cor13 and its standard error. The average correlation and the standard error from this function can be used as input in the meta.ave.cor.gen function in a meta-analysis where some studies have reported cor12 and other studies have reported cor13.

Usage

se.ave.cor.over(cor12, cor13, cor23, n)

Arguments

cor12

estimated correlation between variables 1 and 2

cor13

estimated correlation between variables 1 and 3

cor23

estimated correlation between variables 2 and 3

n

sample size

Value

Returns a two-row matrix. The first row gives results for the average correlation and the second row gives the results with a Fisher transformation. The columns are:

  • Estimate - estimated average of cor12 and cor13

  • SE - standard error

  • VAR(cor12) - variance of cor12

  • VAR(cor13) - variance of cor13

  • COV(cor12,cor13) - covariance of cor12 and cor13

Examples

se.ave.cor.over(.462, .518, .755, 100)

# Should return:
#                Estimate         SE  VAR(cor12) VAR(cor13) COV(cor12,cor13)
# Correlation:  0.4900000 0.07087351 0.006378045 0.00551907      0.004097553
# Fisher:       0.5360603 0.09326690 0.010309278 0.01030928      0.007119936

Computes the standard error for the average of 2-group mean differences from two parallel measurement response variables in the same sample

Description

In a study that reports a 2-group mean difference for two response variables that satisfy the conditions of parallel measurments, this function can be used to compute the standard error of the average of the two mean differences using the two estimated means, estimated standard deviations, estimated within-group correlation between the two response variables, and the two sample sizes. The average mean difference and standard error output from this function can then be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in a meta-analysis where some studies have used one of the two parallel response variables and other studies have used the other parallel response variable. Equality of variances is not assumed.

Usage

se.ave.mean2.dep(m1A, m2A, sd1A, sd2A, m1B, m2B, sd1B, sd2B, rAB, n1, n2)

Arguments

m1A

estimated mean for variable A in group 1

m2A

estimated mean for variable A in group 2

sd1A

estimated standard deviation for variable A in group 1

sd2A

estimated standard deviation for variable A in group 2

m1B

estimated mean for variable B in group 1

m2B

estimated mean for variable B in group 2

sd1B

estimated standard deviation for variable B in group 1

sd2B

estimated standard deviation for variable B in group 2

rAB

estimated within-group correlation between variables A and B

n1

sample size for group 1

n2

sample size for group 2

Value

Returns a one-row matrix:

  • Estimate - estimated average mean difference

  • SE - standard error

  • VAR(A) - variance of mean difference for variable A

  • VAR(B) - variance of mean difference for variable B

  • COV(A,B) - covariance of mean differences for variables A and B

Examples

se.ave.mean2.dep(21.9, 16.1, 3.82, 3.21, 24.8, 17.1, 3.57, 3.64, .785, 40, 40)

# Should return:
#                          Estimate        SE    VAR(A)    VAR(B)  COV(A,B)
# Average mean difference:     6.75 0.7526878 0.6224125 0.6498625 0.4969403

Computes the standard error for a biserial-phi correlation

Description

This function computes an estimate of a biserial-phi correlation and its standard error using the frequency counts from a 2 x 2 contingency table where one variable is naturally dichotomous and the other variable is artifically dichotomous. A biserial-phi correlation could be compatible with a point-biserial correlation in a meta-analysis. The biserial-phi estimate and the standard error from this function can be used as input in the meta.ave.cor.gen function in a meta-analysis where a point-biserial correlation has been obtained in some studies and a biserial-phi correlation has been obtained in other studies.

Usage

se.biphi(f1, f2, n1, n2)

Arguments

f1

number of participants in group 1 who have the attribute

f2

number of participants in group 2 who have the attribute

n1

sample size for group 1

n2

sample size for group 2

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated biserial-phi correlation

  • SE - standard error

Examples

se.biphi(34, 22, 50, 50)

# Should return:
#               Estimate        SE 
# Biserial-phi:  0.27539 0.1074594

Computes the standard error for a biserial correlation

Description

This function computes a biserial correlation and its standard error. A biserial correlation can be used when one variable is quantitative and the other variable has been artifically dichotmized. The biserial correlation estimates the correlation between an observable quantitative variable and an unobserved quantitative variable that is measured on a dichotomous scale. This function requires the estimated mean, estimated standard deviation, and samples size from each level of the dichotomized variable. This function is useful in a meta-analysis of Pearson correlations where some studies report a Pearson correlation and other studies report the information needed to compute a biserial correlation. The biserial correlation and standard error output from this function can be used as input in the meta.ave.cor.gen function.

Usage

se.bscor(m1, m2, sd1, sd2, n1, n2)

Arguments

m1

estimated mean for level 1

m2

estimated mean for level 2

sd1

estimated standard deviation for level 1

sd2

estimated standard deviation for level 2

n1

sample size for level 1

n2

sample size for level 2

Details

This function computes a point-biserial correlation and its standard error as a function of a standardized mean difference with a weighted variance standardizer. Then the point-biserial estimate is transformed into a biserial correlation using the traditional adjustment. The adjustment is also applied to the point-biserial standard error to obtain the standard error for the biserial correlation.

The biserial correlation assumes that the observed quantitative variable and the unobserved quantitative variable have a bivariate normal distribution. Bivariate normality is a crucial assumption underlying the transformation of a point-biserial correlation to a biserial correlation. Bivariate normality also implies equal variances of the observed quantitative variable at each level of the dichotomized variable, and this assumption is made in the computation of the standard error.

Value

Returns a one-row matrix:

  • Estimate - estimated biserial correlation

  • SE - standard error

References

Bonett DG (2020). “Point-biserial correlation: Interval estimation, hypothesis testing, meta-analysis, and sample size determination.” British Journal of Mathematical and Statistical Psychology, 73(S1), 113–144. ISSN 0007-1102, doi:10.1111/bmsp.12189.

Examples

se.bscor(21.9, 16.1, 3.82, 3.21, 40, 40)

#  Should return: 
#                          Estimate         SE
#  Biserial correlation:  0.8018318 0.07451665

Computes the standard error for Cohen's d

Description

This function computes the standard error of Cohen's d using only the two sample sizes and an estimate of Cohen's d. Cohen's d and its standard error assume equal variances. The estimate of Cohen's d, with the standard error output from this function, can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where different types of compatible standardized mean differences are used in the meta-analysis.

Usage

se.cohen(d, n1, n2)

Arguments

d

estimated Cohen's d

n1

sample size for group 1

n2

sample size for group 2

Value

Returns a one-row matrix:

  • Estimate - Cohen's d (from input)

  • SE - standard error

See Also

se.stdmean2

Examples

se.cohen(.78, 35, 50)

# Should return: 
#            Estimate        SE
# Cohen's d:     0.78 0.2288236

Computes the standard error for a Pearson or partial correlation

Description

This function computes the standard error of a Pearson or partial correlation using the estimated correlation, sample size, and number of control variables. The correlation, along with the standard error output from this function, can be used as input in the meta.ave.cor.gen function in applications where a combination of different types of correlations are used in the meta-analysis.

Usage

se.cor(cor, s, n)

Arguments

cor

estimated Pearson or partial correlation

s

number of control variables (set to 0 for Pearson)

n

sample size

Value

Returns a one-row matrix:

  • Estimate - Pearson or partial correlation (from input)

  • SE - standard error

References

Bonett DG (2008). “Meta-analytic interval estimation for bivariate correlations.” Psychological Methods, 13(3), 173–181. ISSN 1939-1463, doi:10.1037/a0012868.

Examples

se.cor(.40, 0, 55)

# Should return: 
#               Estimate       SE
# Correlation:       0.4 0.116487

Computes the standard error for a paired-samples mean difference

Description

This function computes the standard error of a paired-samples mean difference using the estimated means, estimated standard deviations, estimated Pearson correlation, and sample size. The effect size estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where compatible mean differences from a combination of 2-group and paired-samples experiments are used in the meta-analysis. Equality of variances is not assumed.

Usage

se.mean.ps(m1, m2, sd1, sd2, cor, n)

Arguments

m1

estimated mean for measurement 1

m2

estimated mean for measurement 2

sd1

estimated standard deviation for measurement 1

sd2

estimated standard deviation for measurement 2

cor

estimated correlation for measurements 1 and 2

n

sample size

Value

Returns a one-row matrix:

  • Estimate - estimated mean difference

  • SE - standard error

References

Snedecor GW, Cochran WG (1980). Statistical methods, 7th edition. ISU University Pres, Ames, Iowa.

Examples

se.mean.ps(23.9, 25.1, 1.76, 2.01, .78, 25)

# Should return:
#                   Estimate        SE
# Mean difference:      -1.2 0.2544833

Computes the standard error for a 2-group mean difference

Description

This function computes the standard error of a 2-group mean difference using the estimated means, estimated standard deviations, and sample sizes. The effect size estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where compatible mean differences from a combination of 2-group and paired-samples experiments are used in the meta-analysis. Equality of variances is not asumed.

Usage

se.mean2(m1, m2, sd1, sd2, n1, n2)

Arguments

m1

estimated mean for group 1

m2

estimated mean for group 2

sd1

estimated standard deviation for group 1

sd2

estimated standard deviation for group 2

n1

sample size for group 1

n2

sample size for group 2

Value

Returns a one-row matrix:

  • Estimate - estimated mean difference

  • SE - standard error

References

Snedecor GW, Cochran WG (1980). Statistical methods, 7th edition. ISU University Pres, Ames, Iowa.

Examples

se.mean2(21.9, 16.1, 3.82, 3.21, 40, 40)

#                   Estimate        SE
# Mean difference:       5.8 0.7889312

Computes the standard error for a paired-samples log mean ratio

Description

This function computes the standard error of a paired-samples log mean ratio using the estimated means, estimated standard deviations, estimated Pearson correlation, and sample size. The log-mean estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where compatible mean ratios from a combination of 2-group and paired-samples experiments are used in the meta-analysis. Equality of variances is not assumed.

Usage

se.meanratio.ps(m1, m2, sd1, sd2, cor, n)

Arguments

m1

estimated mean for measurement 1

m2

estimated mean for measurement 2

sd1

estimated standard deviation for measurement 1

sd2

estimated standard deviation for measurement 2

cor

estimated correlation for measurements 1 and 2

n

sample size

Value

Returns a one-row matrix:

  • Estimate - estimated log mean ratio

  • SE - standard error

References

Bonett DG, Price RM (2020). “Confidence intervals for ratios of means and medians.” Journal of Educational and Behavioral Statistics, 45(6), 750–770. ISSN 1076-9986, doi:10.3102/1076998620934125.

Examples

se.meanratio.ps(21.9, 16.1, 3.82, 3.21, .748, 40)

# Should return:
#                   Estimate         SE
# Log mean ratio:  0.3076674 0.02130161

Computes the standard error for a 2-group log mean ratio

Description

This function computes the standard error of a 2-group log mean ratio using the estimated means, estimated standard deviations, and sample sizes. The log mean estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in application where compatible mean ratios from a combination of 2-group and paired-samples experiments are used in the meta-analysis. Equality of variances is not assumed.

Usage

se.meanratio2(m1, m2, sd1, sd2, n1, n2)

Arguments

m1

estimated mean for group 1

m2

estimated mean for group 2

sd1

estimated standard deviation for group 1

sd2

estimated standard deviation for group 2

n1

sample size for group 1

n2

sample size for group 2

Value

Returns a one-row matrix:

  • Estimate - estimated log mean ratio

  • SE - standard error

References

Bonett DG, Price RM (2020). “Confidence intervals for ratios of means and medians.” Journal of Educational and Behavioral Statistics, 45(6), 750–770. ISSN 1076-9986, doi:10.3102/1076998620934125.

Examples

se.meanratio2(21.9, 16.1, 3.82, 3.21, 40, 40)

# Should return:
#                   Estimate       SE
# Log mean ratio:  0.3076674 0.041886

Computes the standard error for a log odds ratio

Description

This function computes a log odds ratio and its standard error using the frequency counts and sample sizes in a 2-group design. These frequency counts and sample sizes can be obtained from a 2x2 contingency table. This function is useful in a meta-analysis of odds ratios where some studies report the sample odds ratio and its standard error and other studies only report the frequency counts or a 2x2 contingency table. The log odds ratio and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions.

Usage

se.odds(f1, n1, f2, n2)

Arguments

f1

number of participants who have the outcome in group 1

n1

sample size for group 1

f2

number of participants who have the outcome in group 2

n2

sample size for group 2

Value

Returns a one-row matrix:

  • Estimate - estimated log odds ratio

  • SE - standard error

References

Bonett DG, Price RM (2015). “Varying coefficient meta-analysis methods for odds ratios and risk ratios.” Psychological Methods, 20(3), 394–406. ISSN 1939-1463, doi:10.1037/met0000032.

Examples

se.odds(36, 50, 21, 50)

# Should return: 
#                  Estimate        SE
# Log odds ratio:  1.239501 0.4204435

Computes the standard error for a point-biserial correlation

Description

This function computes a point-biserial correlation and its standard error for two types of point-biserial correlations in 2-group designs using the estimated means, estimated standard deviations, and samples sizes. Equality of variances is not assumed. One type of point-biserial correlation uses an unweighted average of variances and is recommended for 2-group experimental designs. The other type of point-biserial correlation uses a weighted average of variances and is recommended for 2-group nonexperimental designs with simple random sampling (but not stratified random sampling). This function is useful in a meta-analysis of compatible point-biserial correlations where some studies used a 2-group experimental design and other studies used a 2-group nonexperimental design. The effect size estimate and standard error output from this function can be used as input in the meta.ave.cor.gen function.

Usage

se.pbcor(m1, m2, sd1, sd2, n1, n2, type)

Arguments

m1

estimated mean for group 1

m2

estimated mean for group 2

sd1

estimated standard deviation for group 1

sd2

estimated standard deviation for group 2

n1

sample size for group 1

n2

sample size for group 2

type
  • set to 1 for weighted variance average

  • set to 2 for unweighted variance average

Value

Returns a one-row matrix:

  • Estimate - estimated point-biserial correlation

  • SE - standard error

References

Bonett DG (2020). “Point-biserial correlation: Interval estimation, hypothesis testing, meta-analysis, and sample size determination.” British Journal of Mathematical and Statistical Psychology, 73(S1), 113–144. ISSN 0007-1102, doi:10.1111/bmsp.12189.

Examples

se.pbcor(21.9, 16.1, 3.82, 3.21, 40, 40, 1)

#  Should return: 
#                                Estimate         SE
#  Point-biserial correlation:  0.6349786 0.05981325

Computes the estimate and standard error for a paired-samples proportion difference

Description

This function computes the Bonett-Price standard error of a paired-samples proportion difference using the frequency counts from a 2 x 2 contingency table. The effect size estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where compatible proportion differences from a combination of 2-group and paired-samples studies are used in the meta-analysis.

Usage

se.prop.ps(f00, f01, f10, f11)

Arguments

f00

number of participants with y = 0 and x = 0

f01

number of participants with y = 0 and x = 1

f10

number of participants with y = 1 and x = 0

f11

number of participants with y = 1 and x = 1

Value

Returns a one-row matrix:

  • Estimate - estimated proportion difference

  • SE - standard error

References

Bonett DG, Price RM (2012). “Adjusted wald confidence interval for a difference of binomial proportions based on paired data.” Journal of Educational and Behavioral Statistics, 37(4), 479–488. ISSN 1076-9986, doi:10.3102/1076998611411915.

Examples

se.prop.ps(16, 64, 5, 15)

# Should return:
#                          Estimate         SE
# Proportion difference:  0.5784314 0.05953213

Computes the estimate and standard error for a 2-group proportion difference

Description

This function computes the Agresti-Caffo standard error of a 2-group proportion difference using the frequency counts and sample sizes. The effect size estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where compatible proportion differences from a combination of 2-group and paired-samples studies are used in the meta-analysis.

Usage

se.prop2(f1, f2, n1, n2)

Arguments

f1

number of participants in group 1 who have the outcome

f2

number of participants in group 2 who have the outcome

n1

sample size for group 1

n2

sample size for group 2

Value

Returns a one-row matrix:

  • Estimate - estimated proportion difference

  • SE - standard error

References

Agresti A, Caffo B (2000). “Simple and Effective Confidence Intervals for Proportions and Differences of Proportions Result from Adding Two Successes and Two Failures.” The American Statistician, 54(4), 280-288. doi:10.1080/00031305.2000.10474560.

Examples

se.prop2(31, 16, 40, 40)

# Should return:
#                          Estimate        SE
# Proportion difference:  0.3571429 0.1002777

Computes the standard error for a semipartial correlation

Description

This function computes the standard error of a semipartial correlation using the estimated correlation, sample size, and squared multiple correlation for the full model. The full model includes the independent variable of interest and all control variables. The effect size estimate and standard error output from this function can be used as input in the meta.ave.cor.gen function in applications where a combination of different types of correlations are used in the meta-analysis.

Usage

se.semipartial(cor, r2, n)

Arguments

cor

estimated semipartial correlation

r2

estimated squared multiple correlation for a model that includes the IV and all control variables

n

sample size

Value

Returns a one-row matrix:

  • Estimate - semipartial correlation (from input)

  • SE - standard error

Examples

se.semipartial(.40, .25, 60)

# Should return: 
#                           Estimate        SE
# Semipartial correlation:       0.4 0.1063262

Computes a slope and standard error

Description

This function computes a slope and its standard error for a simple linear regression model (random-x model) using the estimated Pearson correlation and the estimated standard deviations of the response variable and predictor variable. This function is useful in a meta-analysis of slopes of a simple linear regression model where some studies report the Pearson correlation but not the slope.

Usage

se.slope(cor, sdy, sdx, n)

Arguments

cor

estimated Pearson correlation

sdy

estimated standard deviation of the response variable

sdx

estimated standard deviation of the predictor variable

n

sample size

Value

Returns a one-row matrix:

  • Estimate - estimated slope

  • SE - standard error

References

Snedecor GW, Cochran WG (1980). Statistical methods, 7th edition. ISU University Pres, Ames, Iowa.

Examples

se.slope(.392, 4.54, 2.89, 60)

# Should return: 
#          Estimate        SE
# Slope:  0.6158062 0.1897647

Computes the standard error for a Spearman correlation

Description

This function computes the Bonett-Wright standard error of a Spearman correlation using the estimated correlation and sample size. The standard error from this function can be used as input in the meta.ave.cor.gen function in applications where a combination of different types of correlations are used in the meta-analysis.

Usage

se.spear(cor, n)

Arguments

cor

estimated Spearman correlation

n

sample size

Value

Returns a one-row matrix:

  • Estimate - Spearman correlation (from input)

  • SE - standard error

References

Bonett DG, Wright TA (2000). “Sample size requirements for estimating Pearson, Kendall and Spearman correlations.” Psychometrika, 65(1), 23–28. ISSN 0033-3123, doi:10.1007/BF02294183.

Examples

se.spear(.40, 55)

# Should return: 
#                       Estimate        SE
# Spearman correlation:      0.4 0.1210569

Computes the standard error for a paired-samples standardized mean difference

Description

This function computes the standard error of a paired-samples standardized mean difference using the sample size and estimated means, standard deviations, and estimated correlation. The effect size estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where compatible standardized mean differences from a combination of 2-group and paired-samples experiments are used in the meta-analysis. Equality of variances is not assumed.

Usage

se.stdmean.ps(m1, m2, sd1, sd2, cor, n, stdzr)

Arguments

m1

estimated mean for measurement 1

m2

estimated mean for measurement 2

sd1

estimated standard deviation for measurement 1

sd2

estimated standard deviation for measurement 2

cor

estimated correlation for measurements 1 and 2

n

sample size

stdzr
  • set to 0 for square root average variance standardizer

  • set to 1 for measurement 1 SD standardizer

  • set to 2 for measurement 2 SD standardizer

Value

Returns a one-row matrix:

  • Estimate - estimated standardized mean difference

  • SE - standard error

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

Examples

se.stdmean.ps(23.9, 25.1, 1.76, 2.01, .78, 25, 0)

# Should return: 
#                                   Estimate        SE
# Standardizedd mean difference:  -0.6352097 0.1602852

Computes the standard error for a 2-group standardized mean difference

Description

This function computes the standard error of a 2-group standardized mean difference using the sample sizes and the estimated means standardizer (stdzr = 0) for 2-group experimental designs. Use the square root weighted variance standardizer (stdzr = 3) for 2-group nonexperimental designs with simple random sampling. The single-group standardizers (stdzr = 1 and stdzr = 2) can be used with either 2-group experimental or nonexperimental designs. The effect size estimate and standard error output from this function can be used as input in the meta.ave.gen, meta.lc.gen, and meta.lm.gen functions in applications where compatible standardized mean differences from a combination of 2-group and paired-samples experiments are used in the meta-analysis. Equality of variances is not assumed.

Usage

se.stdmean2(m1, m2, sd1, sd2, n1, n2, stdzr)

Arguments

m1

estimated mean for group 1

m2

estimated mean for group 2

sd1

estimated standard deviation for group 1

sd2

estimated standard deviation for group 2

n1

sample size for group 1

n2

sample size for group 2

stdzr
  • set to 0 for square root average variance standardizer

  • set to 1 for group 1 SD standardizer

  • set to 2 for group 2 SD standardizer

  • set to 3 for square root weighted variance standardizer

Value

Returns a one-row matrix:

  • Estimate - estimated standardized mean difference

  • SE - standard error

References

Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225–238. ISSN 1939-1463, doi:10.1037/a0016619.

See Also

se.cohen

Examples

se.stdmean2(21.9, 16.1, 3.82, 3.21, 40, 40, 0)

# Should return: 
#                                Estimate        SE
# Standardized mean difference:  1.643894 0.2629049

Computes the standard error for a tetrachoric correlation approximation

Description

This function computes an estimate of a tetrachoric correlation approximation and its standard error using the frequency counts from a 2 x 2 contingency table for two artifically dichotomous variables. A tetrachoric approximation could be compatible with a Pearson correlation in a meta-analysis. The tetrachoric approximation and the standard error from this function can be used as input in the meta.ave.cor.gen function in a meta-analysis where some studies have reported Pearson correlations between quantitative variables x and y and other studies have reported a 2 x 2 contingency table for dichotomous measurements of variables x and y.

Usage

se.tetra(f00, f01, f10, f11)

Arguments

f00

number of participants with y = 0 and x = 0

f01

number of participants with y = 0 and x = 1

f10

number of participants with y = 1 and x = 0

f11

number of participants with y = 1 and x = 1

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated tetrachoric approximation

  • SE - standard error

References

Bonett DG, Price RM (2005). “Inferential methods for the tetrachoric correlation coefficient.” Journal of Educational and Behavioral Statistics, 30(2), 213–225. ISSN 1076-9986, doi:10.3102/10769986030002213.

Examples

se.tetra(46, 15, 54, 85)

# Should return:
#                Estimate         SE 
# Tetrachoric:  0.5135167 0.09358336

Computes Cohen's d from pooled-variance t statistic

Description

This function computes Cohen's d for a 2-group design (which is a standardized mean difference with a weighted variance standardizer) using a pooled-variance independent-samples t statistic and the two sample sizes. This function also computes the standard error for Cohen's d. The Cohen's d estimate and standard error assume equality of population variances.

Usage

stdmean2.from.t(t, n1, n2)

Arguments

t

pooled-variance t statistic

n1

sample size for group 1

n2

sample size for group 2

Value

Returns Cohen's d and its equal-variance standard error

Examples

stdmean2.from.t(3.27, 25, 25)

# Should return:
#             Estimate       SE
# Cohen's d  0.9439677 0.298801

Computes the cell frequencies in a 2x2 table using the marginal proportions and odds ratio

Description

This function computes the cell proportions and frequencies in a 2x2 contingency table using the reported marginal proportions, estimated odds ratio, and total sample size. The cell frequncies could then be used to compute other measures of effect size. In the output, "cell ij" refers to row i and column j.

Usage

table.from.odds(p1row, p1col, or, n)

Arguments

p1row

marginal proportion for row 1

p1col

marginal proportion for column 1

or

estimated odds ratio

n

total sample size

Value

A 2-row matrix. The rows are:

  • Row 1 gives the four computed cell proportions

  • Row 2 gives the four computed cell frequencies

The columns are:

  • cell 11 - proportion and frequency for cell 11

  • cell 12 - proportion and frequency for cell 12

  • cell 21 - proportion and frequency for cell 21

  • cell 22 - proportion and frequency for cell 22

References

Bonett DG (2007). “Transforming odds ratios into correlations for meta-analytic research.” American Psychologist, 62(3), 254–255. doi:10.1037/0003-066X.62.3.254.

Examples

table.from.odds(.17, .5, 3.18, 100)

# Should return:
#                cell 11    cell 12    cell 21    cell 22
# Proportion:  0.1233262 0.04667383  0.3766738  0.4533262
# Frequency:  12.0000000 5.00000000 38.0000000 45.0000000

Computes the cell frequencies in a 2x2 table using the marginal proportions and phi correlation

Description

This function computes the cell proportions and frequencies in a 2x2 contingency table using the reported marginal proportions, estimated phi correlation, and total sample size. The cell frequncies could then be used to compute other measures of effect size. In the output, "cell ij" refers to row i and column j.

Usage

table.from.phi(p1row, p1col, phi, n)

Arguments

p1row

marginal proportion for row 1

p1col

marginal proportion for column 1

phi

estimated phi correlation

n

total sample size

Value

A 2-row matrix. The rows are:

  • Row 1 gives the four computed cell proportions

  • Row 2 gives the four computed cell frequencies

The columns are:

  • cell 11 - proportion and frequency for cell 11

  • cell 12 - proportion and frequency for cell 12

  • cell 21 - proportion and frequency for cell 21

  • cell 22 - proportion and frequency for cell 22

Examples

table.from.phi(.28, .64, .38, 200)

# Should return:
#                cell 11   cell 12    cell 21    cell 22
# Proportion:  0.2610974 0.0189026  0.3789026  0.3410974
# Frequency   52.0000000 4.0000000 76.0000000 68.0000000