Package 'pimeta'

Title: Prediction Intervals for Random-Effects Meta-Analysis
Description: An implementation of prediction intervals for random-effects meta-analysis: Higgins et al. (2009) <doi:10.1111/j.1467-985X.2008.00552.x>, Partlett and Riley (2017) <doi:10.1002/sim.7140>, and Nagashima et al. (2019) <doi:10.1177/0962280218773520>, <arXiv:1804.01054>.
Authors: Kengo Nagashima [aut, cre] , Hisashi Noma [aut], Toshi A. Furukawa [aut]
Maintainer: Kengo Nagashima <[email protected]>
License: GPL-3
Version: 1.1.4
Built: 2024-11-07 04:12:31 UTC
Source: https://github.com/nshi-stat/pimeta

Help Index


Prediction Intervals for Random-Effects Meta-Analysis

Description

Prediction Intervals for Random-Effects Meta-Analysis

Author(s)

Kengo Nagashima, Hisashi Noma, and Toshi A. Furukawa


Calculating Confidence Intervals

Description

This function calculates confidence intervals.

Usage

cima(y, se, v = NULL, alpha = 0.05, method = c("boot", "DL", "HK",
  "SJ", "KR", "APX", "PL", "BC"), B = 25000, parallel = FALSE,
  seed = NULL, maxit1 = 1e+05, eps = 10^(-10), lower = 0,
  upper = 1000, maxit2 = 1000, tol = .Machine$double.eps^0.25,
  rnd = NULL, maxiter = 100)

Arguments

y

the effect size estimates vector

se

the within studies standard errors vector

v

the within studies variance estimates vector

alpha

the alpha level of the prediction interval

method

the calculation method for the pretiction interval (default = "boot").

  • boot: A parametric bootstrap confidence interval (Nagashima et al., 2018).

  • DL: A Wald-type t-distribution confidence interval (the DerSimonian & Laird estimator for τ2\tau^2 with an approximate variance estimator for the average effect, (1/w^i)1(1/\sum{\hat{w}_i})^{-1}, df=K1df=K-1).

  • HK: A Wald-type t-distribution confidence interval (the REML estimator for τ2\tau^2 with the Hartung (1999)'s varance estimator [the Hartung and Knapp (2001)'s estimator] for the average effect, df=K1df=K-1).

  • SJ: A Wald-type t-distribution confidence interval (the REML estimator for τ2\tau^2 with the Sidik and Jonkman (2006)'s bias coreccted SE estimator for the average effect, df=K1df=K-1).

  • KR: Partlett–Riley (2017) confidence interval / (the REML estimator for τ2\tau^2 with the Kenward and Roger (1997)'s approach for the average effect, df=νdf=\nu).

  • APX: A Wald-type t-distribution confidence interval / (the REML estimator for τ2\tau^2 with an approximate variance estimator for the average effect, df=K1df=K-1).

  • PL: Profile likelihood confidence interval (Hardy & Thompson, 1996).

  • BC: Profile likelihood confidence interval with Bartlett-type correction (Noma, 2011).

B

the number of bootstrap samples

parallel

the number of threads used in parallel computing, or FALSE that means single threading

seed

set the value of random seed

maxit1

the maximum number of iteration for the exact distribution function of QQ

eps

the desired level of accuracy for the exact distribution function of QQ

lower

the lower limit of random numbers of τ2\tau^2

upper

the lower upper of random numbers of τ2\tau^2

maxit2

the maximum number of iteration for numerical inversions

tol

the desired level of accuracy for numerical inversions

rnd

a vector of random numbers from the exact distribution of τ2\tau^2

maxiter

the maximum number of iteration for REML estimation

Details

Excellent reviews of heterogeneity variance estimation have been published (e.g., Veroniki, et al., 2018).

Value

  • K: the number of studies.

  • muhat: the average treatment effect estimate μ^\hat{\mu}.

  • lci, uci: the lower and upper confidence limits μ^l\hat{\mu}_l and μ^u\hat{\mu}_u.

  • tau2h: the estimate for τ2\tau^2.

  • i2h: the estimate for I2I^2.

  • nuc: degrees of freedom for the confidence interval.

  • vmuhat: the variance estimate for μ^\hat{\mu}.

References

Veroniki, A. A., Jackson, D., Bender, R., Kuss, O., Langan, D., Higgins, J. P. T., Knapp, G., and Salanti, J. (2019). Methods to calculate uncertainty in the estimated overall effect size from a random-effects meta-analysis Res Syn Meth. 10(1): 23-43. https://doi.org/10.1002/jrsm.1319.

Nagashima, K., Noma, H., and Furukawa, T. A. (2019). Prediction intervals for random-effects meta-analysis: a confidence distribution approach. Stat Methods Med Res. 28(6): 1689-1702. https://doi.org/10.1177/0962280218773520.

Higgins, J. P. T, Thompson, S. G., Spiegelhalter, D. J. (2009). A re-evaluation of random-effects meta-analysis. J R Stat Soc Ser A Stat Soc. 172(1): 137-159. https://doi.org/10.1111/j.1467-985X.2008.00552.x

Partlett, C, and Riley, R. D. (2017). Random effects meta-analysis: Coverage performance of 95 confidence and prediction intervals following REML estimation. Stat Med. 36(2): 301-317. https://doi.org/10.1002/sim.7140

Hartung, J., and Knapp, G. (2001). On tests of the overall treatment effect in meta-analysis with normally distributed responses. Stat Med. 20(12): 1771-1782. https://doi.org/10.1002/sim.791

Sidik, K., and Jonkman, J. N. (2006). Robust variance estimation for random effects meta-analysis. Comput Stat Data Anal. 50(12): 3681-3701. https://doi.org/10.1016/j.csda.2005.07.019

Noma H. (2011) Confidence intervals for a random-effects meta-analysis based on Bartlett-type corrections. Stat Med. 30(28): 3304-3312. https://doi.org/10.1002/sim.4350

See Also

pima

Examples

data(sbp, package = "pimeta")
set.seed(20161102)

# Nagashima-Noma-Furukawa confidence interval
pimeta::cima(sbp$y, sbp$sigmak, seed = 3141592)

# A Wald-type t-distribution confidence interval
# An approximate variance estimator & DerSimonian-Laird estimator for tau^2
pimeta::cima(sbp$y, sbp$sigmak, method = "DL")

# A Wald-type t-distribution confidence interval
# The Hartung variance estimator & REML estimator for tau^2
pimeta::cima(sbp$y, sbp$sigmak, method = "HK")

# A Wald-type t-distribution confidence interval
# The Sidik-Jonkman variance estimator & REML estimator for tau^2
pimeta::cima(sbp$y, sbp$sigmak, method = "SJ")

# A Wald-type t-distribution confidence interval
# The Kenward-Roger approach & REML estimator for tau^2
pimeta::cima(sbp$y, sbp$sigmak, method = "KR")

# A Wald-type t-distribution confidence interval
# An approximate variance estimator & REML estimator for tau^2
pimeta::cima(sbp$y, sbp$sigmak, method = "APX")

# Profile likelihood confidence interval
# Maximum likelihood estimators of variance for the average effect & tau^2
pimeta::cima(sbp$y, sbp$sigmak, method = "PL")

# Profile likelihood confidence interval with a Bartlett-type correction
# Maximum likelihood estimators of variance for the average effect & tau^2
pimeta::cima(sbp$y, sbp$sigmak, method = "BC")

Rubinstein et al. (2019)'s chronic low back pain data

Description

  • ID: Study ID

  • Souce: First author name and year of publication

  • m1: Estimated mean in experimental group

  • s1: Standard deviation in experimental group

  • n1: Number of observations in experimental group

  • m2: Estimated mean in control group

  • s2: Standard deviation in control group

  • n2: Number of observations in control group

Usage

data(clbp)

Format

A data frame with 23 rows and 8 variables

References

Rubinstein, S. M,, de Zoete, A., van Middelkoop, M., Assendelft, W. J. J., de Boer, M. R., van Tulder, M. W. (2019). Benefits and harms of spinal manipulative therapy for the treatment of chronic low back pain: systematic review and meta-analysis of randomised controlled trials. BMJ. 364: l689. https://doi.org/10.1136/bmj.l689


Converting binary data

Description

Converting binary outcome data to the effect size estimates and the within studies standard errors vector

Usage

convert_bin(m1, n1, m2, n2, type = c("logOR", "logRR", "RD"))

Arguments

m1

A vector of the number of successes in experimental group

n1

A vector of the number of patients in experimental group

m2

A vector of the number of successes in contorol group

n2

A vector of the number of patients in contorol group

type

the outcome measure for binary outcome data (default = "logOR").

  • logOR: logarithmic odds ratio, which is defined by =log(m1+0.5)(n2m2+0.5)(n1m1+0.5)(m2+0.5)=\log \frac{(m1+0.5)(n2-m2+0.5)}{(n1-m1+0.5)(m2+0.5)}.

  • logRR: logarithmic relative risk, which is defined by =log(m1+0.5)(n2+0.5)(n1+0.5)(m2+0.5)=\log \frac{(m1+0.5)(n2+0.5)}{(n1+0.5)(m2+0.5)}.

  • RD: risk difference, which is defined by =m1n1m2n2=\frac{m1}{n1}-\frac{m2}{n2}.

Details

This function implements methods for logarithmic odds ratio, logarithmic relative risk, and risk difference described in Hartung & Knapp (2001).

Value

A data.frame of study data.

  • y: A numeric vector of the effect size estimates.

  • se: A numeric vector of the within studies standard errors.

References

Hartung, J., and Knapp, G. (2001). A refined method for the meta-analysis of controlled clinical trials with binary outcome. Stat Med. 20(24): 3875-3889. https://doi.org/10.1002/sim.1009

Examples

require("flexmeta")
m1 <- c(15,12,29,42,14,44,14,29,10,17,38,19,21)
n1 <- c(16,16,34,56,22,54,17,58,14,26,44,29,38)
m2 <- c( 9, 1,18,31, 6,17, 7,23, 3, 6,12,22,19)
n2 <- c(16,16,34,56,22,55,15,58,15,27,45,30,38)
dat <- convert_bin(m1, n1, m2, n2, type = "logOR")
print(dat)

Converting means and standard deviations

Description

Converting estimated means and standard deviations in experimental and contorol groups to the effect size estimates and the within studies standard errors vector

Usage

convert_mean(n1, m1, s1, n2, m2, s2, pooled = FALSE)

Arguments

n1

A vector of number of observations in experimental group

m1

A vector of estimated mean in experimental group

s1

A vector of standard deviation in experimental group

n2

A vector of number of observations in experimental group

m2

A vector of estimated mean in experimental group

s2

A vector of standard deviation in experimental group

pooled

logical; if TRUE, a pooled variance is used. The default is FALSE.

Value

A data.frame of study data.

  • y: A numeric vector of the effect size estimates.

  • se: A numeric vector of the within studies standard error estimates.

Examples

require("flexmeta")
data("clbp")
dat <- convert_mean(clbp$n1, clbp$m1, clbp$s1, clbp$n2, clbp$m2, clbp$s2)
print(dat)

Funnel Plot

Description

Function for funnel plot of 'pima' or 'cima' objects.

Usage

## S3 method for class 'pima'
plot(x, title = "Funnel plot", base_size = 16,
  base_family = "", digits = 3, trans = c("identity", "exp"))

Arguments

x

'pima' or 'cima' object to plot

title

graph title

base_size

base font size

base_family

base font family

digits

a value for digits specifies the minimum number of significant digits to be printed in values.

trans

transformation for logarithmic scale outcomes ("identity" [default] or "exp").

Examples

data(sbp, package = "pimeta")
piex <- pimeta::pima(sbp$y, sbp$sigmak, method = "HTS")
cairo_pdf("forestplot.pdf", width = 5, height = 5, family = "Arial")
funnel(piex, digits = 2, base_size = 10)
dev.off()

Hypertension data

Description

The hypertension data (Wang et al., 2005) included 7 studies comparing the treatment effect of anti-hypertensive treatment versus control on reducing diastolic blood pressure (DBP) in patients with hypertension. Negative estimates indicate the reduction of DBP in the anti-hypertensive treatment group.

Usage

data(hyp)

Format

A data frame with 10 rows and 2 variables

Details

  • y: Standardized mean difference

  • se: Standard error

  • label: Labels for each study

References

Wang, J. G., Staessen, J. A., Franklin, S. S., Fagard, R., and Gueyffier, F. (2005). Systolic and diastolic blood pressure lowering as determinants of cardiovascular outcome. Hypertension. 45(5): 907-913. https://doi.org/10.1161/01.HYP.0000165020.14745.79


I2I^2 heterogeneity measure

Description

Returns the estimator for (Higgins & Thompson, 2002).

Usage

i2h(se, tau2h)

Arguments

se

the within studies standard errors vector

tau2h

the estimate of τ2\tau^2

Value

  • i2h: the estimate for I2I^2.

References

Higgins, J. P. T., and Thompson, S. G. (2002). Quantifying heterogeneity in a meta-analysis. Stat Med. 21(11): 1539-1558. https://doi.org/10.1002/sim.1186

Examples

data(sbp, package = "pimeta")
tau2h <- pimeta::tau2h(sbp$y, sbp$sigmak)
pimeta::i2h(sbp$sigmak, tau2h$tau2h)

Koutoukidis et al. (2019)'s nonalcoholic fatty liver disease data

Description

  • ID: Study ID

  • Souce: First author name and year of publication

  • m1: Estimated mean in experimental group

  • s1: Standard deviation in experimental group

  • n1: Number of observations in experimental group

  • m2: Estimated mean in control group

  • s2: Standard deviation in control group

  • n2: Number of observations in control group

Usage

data(nfld)

Format

A data frame with 25 rows and 8 variables

References

Koutoukidis, D. A,, Astbury, N. M., Tudor, K. E., Morris, E., Henry, J. A., Noreik, M., Jebb, S. A., Aveyard, P. (2019). Association of Weight Loss Interventions With Changes in Biomarkers of Nonalcoholic Fatty Liver Disease: A Systematic Review and Meta-analysis. JAMA Intern Med. 179(9): 1262-1271. https://doi.org/10.1001/jamainternmed.2019.2248


Pain data

Description

The pain data (Riley et al., 2011; Hauser et al., 2009) included 22 studies comparing the treatment effect of antidepressants on reducing pain in patients with fibromyalgia syndrome. The treatment effects were summarized using standardized mean differences on a visual analog scale for pain between the antidepressant group and control group. Negative estimates indicate the reduction of pain in the antidepressant group.

Usage

data(pain)

Format

A data frame with 22 rows and 2 variables

Details

  • y: Standardized mean difference

  • sigmak: Standard error

References

Hauser, W., Bernardy, K, Uceyler, N., and Sommer, C. (2009). Treatment of fibromyalgia syndrome with antidepressants: a meta-analysis. JAMA. 301(2): 198-209. https://jamanetwork.com/journals/jama/fullarticle/183189

Riley, R. D., Higgins, J. P. T, and Deeks, J. J. (2011). Interpretation of random effects meta-analyses. BMJ. 342: d549. https://doi.org/10.1136/bmj.d549


Calculating Prediction Intervals

Description

This function can estimate prediction intervals (PIs) as follows: A parametric bootstrap PI based on confidence distribution (Nagashima et al., 2018). A parametric bootstrap confidence interval is also calculated based on the same sampling method for bootstrap PI. The Higgins–Thompson–Spiegelhalter (2009) prediction interval. The Partlett–Riley (2017) prediction intervals.

Usage

pima(y, se, v = NULL, alpha = 0.05, method = c("boot", "HTS", "HK",
  "SJ", "KR", "CL", "APX", "WL"), theta0 = 0, side = c("lt", "gt"),
  B = 25000, parallel = FALSE, seed = NULL, maxit1 = 1e+05,
  eps = 10^(-10), lower = 0, upper = 1000, maxit2 = 1000,
  tol = .Machine$double.eps^0.25, rnd = NULL, maxiter = 100)

Arguments

y

the effect size estimates vector

se

the within studies standard error estimates vector

v

the within studies variance estimates vector

alpha

the alpha level of the prediction interval

method

the calculation method for the pretiction interval (default = "boot").

  • boot: A parametric bootstrap prediction interval (Nagashima et al., 2018).

  • HTS: the Higgins–Thompson–Spiegelhalter (2009) prediction interval / (the DerSimonian & Laird estimator for τ2\tau^2 with an approximate variance estimator for the average effect, (1/w^i)1(1/\sum{\hat{w}_i})^{-1}, df=K2df=K-2).

  • HK: Partlett–Riley (2017) prediction interval (the REML estimator for τ2\tau^2 with the Hartung (1999)'s variance estimator [the Hartung and Knapp (2001)'s estimator] for the average effect, df=K2df=K-2).

  • SJ: Partlett–Riley (2017) prediction interval / (the REML estimator for τ2\tau^2 with the Sidik and Jonkman (2006)'s bias coreccted variance estimator for the average effect, df=K2df=K-2).

  • KR: Partlett–Riley (2017) prediction interval / (the REML estimator for τ2\tau^2 with the Kenward and Roger (1997)'s approach for the average effect, df=ν1df=\nu-1).

  • APX: Partlett–Riley (2017) prediction interval / (the REML estimator for τ2\tau^2 with an approximate variance estimator for the average effect, df=K2df=K-2). for the average effect, df=ν1df=\nu-1).

  • WL: Wang–Lee (2019) prediction interval / (a method of sample quantiles of ensemble estimates).

theta0

threshold θ0\theta_0, for the cumulative probability of effect θnew\theta_{new} less or greater than θ0\theta_0; Pr(θnew<θ0)\Pr(\theta_{new} < \theta_0) or Pr(θnew>θ0)\Pr(\theta_{new} > \theta_0).

side

either the cumulative probability of effect less (default = "lt") or greater ("gt") then θ0\theta_0

B

the number of bootstrap samples

parallel

the number of threads used in parallel computing, or FALSE that means single threading

seed

set the value of random seed

maxit1

the maximum number of iteration for the exact distribution function of QQ

eps

the desired level of accuracy for the exact distribution function of QQ

lower

the lower limit of random numbers of τ2\tau^2

upper

the upper limit of random numbers of τ2\tau^2

maxit2

the maximum number of iteration for numerical inversions

tol

the desired level of accuracy for numerical inversions

rnd

a vector of random numbers from the exact distribution of τ2\tau^2

maxiter

the maximum number of iteration for REML estimation

Details

The functions bootPI, pima_boot, pima_hts, htsdl, pima_htsreml, htsreml are deprecated, and integrated to the pima function.

Value

  • K: the number of studies.

  • muhat: the average treatment effect estimate μ^\hat{\mu}.

  • lci, uci: the lower and upper confidence limits μ^l\hat{\mu}_l and μ^u\hat{\mu}_u.

  • lpi, upi: the lower and upper prediction limits c^l\hat{c}_l and c^u\hat{c}_u.

  • tau2h: the estimate for τ2\tau^2.

  • i2h: the estimate for I2I^2.

  • nup: degrees of freedom for the prediction interval.

  • nuc: degrees of freedom for the confidence interval.

  • vmuhat: the variance estimate for μ^\hat{\mu}.

References

Higgins, J. P. T, Thompson, S. G., Spiegelhalter, D. J. (2009). A re-evaluation of random-effects meta-analysis. J R Stat Soc Ser A Stat Soc. 172(1): 137-159. https://doi.org/10.1111/j.1467-985X.2008.00552.x

Partlett, C, and Riley, R. D. (2017). Random effects meta-analysis: Coverage performance of 95 confidence and prediction intervals following REML estimation. Stat Med. 36(2): 301-317. https://doi.org/10.1002/sim.7140

Nagashima, K., Noma, H., and Furukawa, T. A. (2019). Prediction intervals for random-effects meta-analysis: a confidence distribution approach. Stat Methods Med Res. 28(6): 1689-1702. https://doi.org/10.1177/0962280218773520.

Wang, C-C and Lee, W-C. (2019). A simple method to estimate prediction intervals and predictive distributions. Res Syn Meth. 30(28): 3304-3312. https://doi.org/10.1002/jrsm.1345.

Hartung, J. (1999). An alternative method for meta-analysis. Biom J. 41(8): 901-916. https://doi.org/10.1002/(SICI)1521-4036(199912)41:8<901::AID-BIMJ901>3.0.CO;2-W.

Hartung, J., and Knapp, G. (2001). On tests of the overall treatment effect in meta-analysis with normally distributed responses. Stat Med. 20(12): 1771-1782. https://doi.org/10.1002/sim.791.

Sidik, K., and Jonkman, J. N. (2006). Robust variance estimation for random effects meta-analysis. Comput Stat Data Anal. 50(12): 3681-3701. https://doi.org/10.1016/j.csda.2005.07.019.

Kenward, M. G., and Roger, J. H. (1997). Small sample inference for fixed effects from restricted maximum likelihood. Biometrics. 53(3): 983-997. https://www.ncbi.nlm.nih.gov/pubmed/9333350.

DerSimonian, R., and Laird, N. (1986). Meta-analysis in clinical trials. Control Clin Trials. 7(3): 177-188.

See Also

print.pima, plot.pima, cima.

Examples

data(sbp, package = "pimeta")

# Nagashima-Noma-Furukawa prediction interval
# is sufficiently accurate when I^2 >= 10% and K >= 3
pimeta::pima(sbp$y, sbp$sigmak, seed = 3141592, parallel = 4)

# Higgins-Thompson-Spiegelhalter prediction interval and
# Partlett-Riley prediction intervals
# are accurate when I^2 > 30% and K > 25
pimeta::pima(sbp$y, sbp$sigmak, method = "HTS")
pimeta::pima(sbp$y, sbp$sigmak, method = "HK")
pimeta::pima(sbp$y, sbp$sigmak, method = "SJ")
pimeta::pima(sbp$y, sbp$sigmak, method = "KR")
pimeta::pima(sbp$y, sbp$sigmak, method = "APX")

Plot Results

Description

A function for plotting of 'cima' objects.

Usage

## S3 method for class 'cima'
plot(x, y = NULL, title = "Forest plot",
  base_size = 16, base_family = "", digits = 3, studylabel = NULL,
  ntick = NULL, trans = c("identity", "exp"), ...)

Arguments

x

'cima' object to plot

y

is not used

title

graph title

base_size

base font size

base_family

base font family

digits

a value for digits specifies the minimum number of significant digits to be printed in values.

studylabel

labels for each study

ntick

the number of x-axis ticks

trans

transformation for logarithmic scale outcomes ("identity" [default] or "exp").

...

further arguments passed to or from other methods.

Examples

data(sbp, package = "pimeta")
ciex <- pimeta::cima(sbp$y, sbp$sigmak, method = "DL")
cairo_pdf("forestplot.pdf", width = 6, height = 3, family = "Arial")
plot(ciex, digits = 2, base_size = 10, studylabel = sbp$label)
dev.off()

Plot Results

Description

A function for plotting of 'pima' objects.

Usage

## S3 method for class 'pima'
plot(x, y = NULL, title = "Forest plot",
  base_size = 16, base_family = "", digits = 3, studylabel = NULL,
  ntick = NULL, trans = c("identity", "exp"), ...)

Arguments

x

'pima' object to plot

y

is not used

title

graph title

base_size

base font size

base_family

base font family

digits

a value for digits specifies the minimum number of significant digits to be printed in values.

studylabel

labels for each study

ntick

the number of x-axis ticks

trans

transformation for logarithmic scale outcomes ("identity" [default] or "exp").

...

further arguments passed to or from other methods.

Examples

data(sbp, package = "pimeta")
piex <- pimeta::pima(sbp$y, sbp$sigmak, method = "HTS")
cairo_pdf("forestplot.pdf", width = 6, height = 3, family = "Arial")
plot(piex, digits = 2, base_size = 10, studylabel = sbp$label)
dev.off()

Print Results

Description

print prints its argument and returns it invisibly (via invisible(x)).

Usage

## S3 method for class 'cima'
print(x, digits = 4, trans = c("identity", "exp"), ...)

Arguments

x

print to display

digits

a value for digits specifies the minimum number of significant digits to be printed in values.

trans

transformation for logarithmic scale outcomes ("identity" [default] or "exp").

...

further arguments passed to or from other methods.


Print Results

Description

print prints its argument and returns it invisibly (via invisible(x)).

Usage

## S3 method for class 'pima'
print(x, digits = 4, trans = c("identity", "exp"), ...)

Arguments

x

print to display

digits

a value for digits specifies the minimum number of significant digits to be printed in values.

trans

transformation for logarithmic scale outcomes ("identity" [default] or "exp").

...

further arguments passed to or from other methods.


Print Results

Description

print prints its argument and returns it invisibly (via invisible(x)).

Usage

## S3 method for class 'pima_tau2h'
print(x, digits = 3, ...)

Arguments

x

print to display

digits

a value for digits specifies the minimum number of significant digits to be printed in values.

...

further arguments passed to or from other methods.


The Distribution of a Positive Linear Combination of Chiqaure Random Variables

Description

The cumulative distribution function for the distribution of a positive linear combination of χ2\chi^2 random variables with the weights (λ1,,λK\lambda_1, \ldots, \lambda_K), degrees of freedom (ν1,,νK\nu_1, \ldots, \nu_K), and non-centrality parameters (δ1,,δK\delta_1, \ldots, \delta_K).

Usage

pwchisq(x, lambda = 1, nu = 1, delta = 0, mode = 1,
  maxit1 = 1e+05, eps = 10^(-10))

Arguments

x

numeric; value of x > 0 (P[Xx]P[X \le x]).

lambda

numeric vector; weights (λ1,,λK\lambda_1, \ldots, \lambda_K).

nu

integer vector; degrees of freedom (ν1,,νK\nu_1, \ldots, \nu_K).

delta

numeric vector; non-centrality parameters (δ1,,δK\delta_1, \ldots, \delta_K).

mode

numeric; the mode of calculation (see Farabrother, 1984)

maxit1

integer; the maximum number of iteration.

eps

numeric; the desired level of accuracy.

Value

  • prob: the distribution function.

References

Farebrother, R. W. (1984). Algorithm AS 204: the distribution of a positive linear combination of χ2\chi^2 random variables. J R Stat Soc Ser C Appl Stat. 33(3): 332–339. https://rss.onlinelibrary.wiley.com/doi/10.2307/2347721.

Examples

# Table 1 of Farabrother (1984)
# Q6 (The taget values are 0.0061, 0.5913, and 0.9779)

pimeta::pwchisq( 20, lambda = c(7,3), nu = c(6,2), delta = c(6,2))
pimeta::pwchisq(100, lambda = c(7,3), nu = c(6,2), delta = c(6,2))
pimeta::pwchisq(200, lambda = c(7,3), nu = c(6,2), delta = c(6,2))
# [1] 0.006117973
# [1] 0.5913421
# [1] 0.9779184

Systolic blood pressure (SBP) data

Description

Riley et al. (2011) analyzed a hypothetical meta-analysis. They generated a data set of 10 studies examining the same antihypertensive drug. Negative estimates suggested reduced blood pressure in the treatment group.

Usage

data(sbp)

Format

A data frame with 10 rows and 2 variables

Details

  • y: Standardized mean difference

  • sigmak: Standard error

  • label: Labels for each generated study

References

Riley, R. D., Higgins, J. P. T, and Deeks, J. J. (2011). Interpretation of random effects meta-analyses. BMJ. 342: d549. https://doi.org/10.1136/bmj.d549


Set-shifting data

Description

Higgins et al. (2009) re-analyzed data (Roberts et al., 2007) that included 14 studies evaluating the set-shifting ability in people with eating disorders by using a prediction interval. Standardized mean differences in the time taken to complete Trail Making Test between subjects with eating disorders and healthy controls were collected. Positive estimates indicate impairment in set shifting ability in people with eating disorders.

Usage

data(setshift)

Format

A data frame with 14 rows and 2 variables

Details

  • y: Standardized mean difference

  • sigmak: Standard error

References

Roberts, M. E., Tchanturia, K., Stahl, D., Southgate, L., and Treasure, J. (2007). A systematic review and meta-analysis of set-shifting ability in eating disorders. Psychol Med. 37(8): 1075-1084. https://doi.org/10.1017/S0033291707009877

Higgins, J. P. T, Thompson, S. G., Spiegelhalter, D. J. (2009). A re-evaluation of random-effects meta-analysis. J R Stat Soc Ser A Stat Soc. 172(1): 137-159. https://doi.org/10.1111/j.1467-985X.2008.00552.x


Calculating Heterogeneity Variance

Description

Returns a heterogeneity variance estimate and its confidence interval.

Usage

tau2h(y, se, maxiter = 100, method = c("DL", "VC", "PM", "HM", "HS",
  "ML", "REML", "AREML", "SJ", "SJ2", "EB", "BM"), methodci = c(NA, "ML",
  "REML"), alpha = 0.05)

Arguments

y

the effect size estimates vector

se

the within studies standard errors vector

maxiter

the maximum number of iterations

method

the calculation method for heterogeneity variance (default = "DL").

  • DL: DerSimonian–Laird estimator (DerSimonian & Laird, 1986).

  • VC: Variance component type estimator (Hedges, 1983).

  • PM: Paule–Mandel estimator (Paule & Mandel, 1982).

  • HM: Hartung–Makambi estimator (Hartung & Makambi, 2003).

  • HS: Hunter–Schmidt estimator (Hunter & Schmidt, 2004). This estimator has negative bias (Viechtbauer, 2005).

  • ML: Maximum likelihood (ML) estimator (e.g., DerSimonian & Laird, 1986).

  • REML: Restricted maximum likelihood (REML) estimator (e.g., DerSimonian & Laird, 1986).

  • AREML: Approximate restricted maximum likelihood estimator (Thompson & Sharp, 1999).

  • SJ: Sidik–Jonkman estimator (Sidik & Jonkman, 2005).

  • SJ2: Sidik–Jonkman improved estimator (Sidik & Jonkman, 2007).

  • EB: Empirical Bayes estimator (Morris, 1983).

  • BM: Bayes modal estimator (Chung, et al., 2013).

methodci

the calculation method for a confidence interval of heterogeneity variance (default = NA).

  • NA: a confidence interval will not be calculated.

  • ML: Wald confidence interval with a ML estimator (Biggerstaff & Tweedie, 1997).

  • REML: Wald confidence interval with a REML estimator (Biggerstaff & Tweedie, 1997).

alpha

the alpha level of the confidence interval

Details

Excellent reviews of heterogeneity variance estimation have been published (Sidik & Jonkman, 2007; Veroniki, et al., 2016; Langan, et al., 2018).

Value

  • tau2h: the estimate for τ2\tau^2.

  • lci, uci: the lower and upper confidence limits τ^l2\hat{\tau}^2_l and τ^u2\hat{\tau}^2_u.

References

Sidik, K., and Jonkman, J. N. (2007). A comparison of heterogeneity variance estimators in combining results of studies. Stat Med. 26(9): 1964-1981. https://doi.org/10.1002/sim.2688.

Veroniki, A. A., Jackson, D., Viechtbauer, W., Bender, R., Bowden, J., Knapp, G., Kuss, O., Higgins, J. P. T., Langan, D., and Salanti, J. (2016). Methods to estimate the between-study variance and its uncertainty in meta-analysis. Res Syn Meth. 7(1): 55-79. https://doi.org/10.1002/jrsm.1164.

Langan, D., Higgins, J. P. T., Jackson, D., Bowden, J., Veroniki, A. A., Kontopantelis, E., Viechtbauer, W., and Simmonds, M. (2018). A comparison of heterogeneity variance estimators in simulated random-effects meta-analyses. Res Syn Meth. In press. https://doi.org/10.1002/jrsm.1316.

DerSimonian, R., and Laird, N. (1986). Meta-analysis in clinical trials. Control Clin Trials. 7(3): 177-188. https://doi.org/10.1016/0197-2456(86)90046-2.

Hedges, L. V. (1983). A random effects model for effect sizes. Psychol Bull. 93(2): 388-395. https://doi.org/10.1037/0033-2909.93.2.388.

Paule, R. C., and Mandel, K. H. (1982). Consensus values and weighting factors. J Res Natl Inst Stand Techno. 87(5): 377-385. https://doi.org/10.6028/jres.087.022.

Hartung, J., and Makambi, K. H. (2003). Reducing the number of unjustified significant results in meta-analysis. Commun Stat Simul Comput. 32(4): 1179-1190. https://doi.org/10.1081/SAC-120023884.

Hunter, J. E., and Schmidt, F. L. (2004). Methods of Meta-Analysis: Correcting Error and Bias in Research Findings. 2nd edition. Sage Publications, Inc.

Viechtbauer, W. (2005). Bias and efficiency of meta-analytic variance estimators in the random-effects model. J Educ Behav Stat. 30(3): 261-293. https://doi.org/10.3102/10769986030003261.

Thompson, S. G., and Sharp, S. J. (1999). Explaining heterogeneity in meta-analysis: a comparison of methods. Stat Med. 18(20): 2693-2708. https://doi.org/10.1002/(SICI)1097-0258(19991030)18:20<2693::AID-SIM235>3.0.CO;2-V.

Sidik, K., and Jonkman, J. N. (2005). Simple heterogeneity variance estimation for meta-analysis. J R Stat Soc Ser C Appl Stat. 54(2): 367-384. https://doi.org/10.1111/j.1467-9876.2005.00489.x.

Morris, C. N. (1983). Parametric empirical Bayes inference: theory and applications. J Am Stat Assoc. 78(381): 47-55. https://doi.org/10.1080/01621459.1983.10477920.

Chung, Y. L., Rabe-Hesketh, S., and Choi, I-H. (2013). Avoiding zero between-study variance estimates in random-effects meta-analysis. Stat Med. 32(23): 4071-4089. https://doi.org/10.1002/sim.5821.

Biggerstaff, B. J., and Tweedie, R. L. (1997). Incorporating variability in estimates of heterogeneity in the random effects model in meta-analysis. Stat Med. 16(7): 753-768. https://doi.org/10.1002/(SICI)1097-0258(19970415)16:7<753::AID-SIM494>3.0.CO;2-G.

Examples

data(sbp, package = "pimeta")
pimeta::tau2h(sbp$y, sbp$sigmak)