pct_pval: Return sign test p-value for meta-analysis percentile

Description Usage Arguments References Examples

View source: R/functions.R

Description

Returns a p-value for testing the hypothesis that mu is the pct^th percentile of the population effect distribution based on the nonparametric sign test method of Wang et al. (2010). This function is also called by prop_stronger when using the sign test method.

Usage

1
pct_pval(yi, sei, mu, pct, R = 2000)

Arguments

yi

Vector of study-level point estimates

sei

Vector of study-level standard errors

mu

The effect size to test as the pct^th percentile

pct

The percentile of interest (e.g., 0.50 for the median)

R

Number of simulation iterates to use when estimating null distribution of the test statistic.

References

Wang R, Tian L, Cai T, & Wei LJ (2010). Nonparametric inference procedure for percentiles of the random effects distribution in meta-analysis. Annals of Applied Statistics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# calculate effect sizes for example dataset
d = metafor::escalc(measure="RR", ai=tpos, bi=tneg,
                   ci=cpos, di=cneg, data=metadat::dat.bcg)

# test H0: the median is -0.3
# using only R = 100 for speed, but should be much larger (e.g., 2000) in practice
pct_pval( yi = d$yi,
          sei = sqrt(d$vi),
          mu = -0.3,
          pct = 0.5,
          R = 100 )

MetaUtility documentation built on Oct. 30, 2021, 5:07 p.m.