Learn R Programming

pimeta (version 1.1.1)

pima: Calculating Prediction Intervals

Description

This function calculates prediction intervals using pima_boot, pima_hts, or pima_htsreml functions.

Usage

pima(y, se, alpha = 0.05, method = c("boot", "HTS", "HK", "SJ", "CL"),
  B = 25000, 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

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 \(\tau^2\) with a standard SE estimator for the average effect, \((1/\sum{\hat{w}_i})^{-1}\).

  • HK: Partlett--Riley (2017) prediction interval / the REML estimator for \(\tau^2\) with the Hartung and Knapp (2001)'s SE estimator for the average effect.

  • SJ: Partlett--Riley (2017) prediction interval / the REML estimator for \(\tau^2\) with the Sidik and Jonkman (2006)'s bias coreccted SE estimator for the average effect.

  • CL: a prediction interval with REML and standard SE / the REML estimator for \(\tau^2\) with a standard SE estimator for the average effect.

B

the number of bootstrap samples

maxit1

the maximum number of iteration for the exact distribution function of \(Q\)

eps

the desired level of accuracy for the exact distribution function of \(Q\)

lower

the lower limit of random numbers of \(\tau^2\)

upper

the lower upper of random numbers of \(\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 \(\tau^2\)

maxiter

the maximum number of iteration for REML estimation

Value

  • muhat: the average treatment effect estimate \(\hat{\mu}\).

  • lci, lci: the lower and upper confidence limits \(\hat{\mu}_l\) and \(\hat{\mu}_u\).

  • lpi, lpi: the lower and upper prediction limits \(\hat{c}_l\) and \(\hat{c}_u\).

  • tau2h: the estimate for \(\tau^2\).

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.

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.

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

See Also

pima_boot(), pima_hts(), pima_htsreml().

Examples

Run this code
# NOT RUN {
data(sbp, package = "pimeta")
set.seed(20161102)
# }
# NOT RUN {
pimeta::pima(sbp$y, sbp$sigmak, B = 50000)
# }
# NOT RUN {
# 
# Prediction Interval for Random-Effects Meta-Analysis
# 
# A parametric bootstrap prediction interval
#  Heterogeneity variance: DerSimonian-Laird
#  SE for average treatment effect: Hartung
# 
# Average treatment effect [95%PI]:
#  -0.3341 [-0.8769, 0.2248]
# 
# Average treatment effect [95%CI]:
#  -0.3341 [-0.5660, -0.0976]
# 
# Heterogeneity variance (tau^2):
#  0.0282
 
# }
# NOT RUN {
pimeta::pima(sbp$y, sbp$sigmak, method = "HTS")
# }
# NOT RUN {
# 
# Prediction Interval for Random-Effects Meta-Analysis
# 
# Higgins-Thompson-Spiegelhalter prediction interval
#  Heterogeneity variance: DerSimonian-Laird
#  SE for average treatment effect: standard
# 
# Average treatment effect [95%PI]:
#  -0.3341 [-0.7598, 0.0917]
# 
# Average treatment effect [95%CI]:
#  -0.3341 [-0.5068, -0.1613]
# 
# Heterogeneity variance (tau^2):
#  0.0282

# }
# NOT RUN {
pimeta::pima(sbp$y, sbp$sigmak, method = "HK")
# }
# NOT RUN {
# 
# Prediction Interval for Random-Effects Meta-Analysis
# 
# Partlett-Riley prediction interval
#  Heterogeneity variance: REML
#  SE for average treatment effect: Hartung-Knapp
# 
# Average treatment effect [95%PI]:
#  -0.3287 [-0.9887, 0.3312]
# 
# Average treatment effect [95%CI]:
#  -0.3287 [-0.5761, -0.0814]
# 
# Heterogeneity variance (tau^2):
#  0.0700

# }
# NOT RUN {
pimeta::pima(sbp$y, sbp$sigmak, method = "SJ")
# }
# NOT RUN {
# 
# Prediction Interval for Random-Effects Meta-Analysis
# 
# Partlett-Riley prediction interval
#  Heterogeneity variance: REML
#  SE for average treatment effect: Hartung-Knapp
# 
# Average treatment effect [95%PI]:
#  -0.3287 [-0.9835, 0.3261]
# 
# Average treatment effect [95%CI]:
#  -0.3287 [-0.5625, -0.0950]
# 
# Heterogeneity variance (tau^2):
#  0.0700
# }

Run the code above in your browser using DataLab