################################################################################## ## functions ## exact.meta : calculate the exact confidence interval with the naive alogirthm ## exact.meta can deal meta analysis with 6-20 studies ## fast.meta: calculate the exact confidence interval with the fast algorithm ## fast.meta can deal meta analysis with 8-20 studies ################################################################################## ## input ## y: point estimator from each study ## v: variance of the point estimator from each study ## type: the choice of test statistics. It can be "median", "DL" and "wang" ################################################################################### ## output ## the 95% exact confidence i ################################################################################### ## Example set.seed(123) K=18 v=runif(K, 0.5, 2) y=rnorm(K)*sqrt(v)+qnorm((1:K)/(K+1)) exact.meta(y, v, type="wang") fast.meta(y, v, type="wang") exact.meta(y, v, type="median") fast.meta(y, v, type="median") fast.meta(y, v, type="DL") exact.meta(y, v, type="DL") ####################################################################################