tes | R Documentation |
Function to conduct the test of excess significance. \loadmathjax
tes(x, vi, sei, subset, data, H0=0, alternative="two.sided", alpha=.05, theta, tau2,
test, tes.alternative="greater", progbar=TRUE, tes.alpha=.10, digits, ...)
## S3 method for class 'tes'
print(x, digits=x$digits, ...)
These arguments pertain to data input:
x |
a vector with the observed effect sizes or outcomes or an object of class |
vi |
vector with the corresponding sampling variances (ignored if |
sei |
vector with the corresponding standard errors (note: only one of the two, |
subset |
optional (logical or numeric) vector to specify the subset of studies that should be included (ignored if |
data |
optional data frame containing the variables given to the arguments above. |
These arguments pertain to the tests of the observed effect sizes or outcomes:
H0 |
numeric value to specify the value of the effect size or outcome under the null hypothesis (the default is 0). |
alternative |
character string to specify the sidedness of the hypothesis when testing the observed effect sizes or outcomes. Possible options are |
alpha |
alpha level for testing the observed effect sizes or outcomes (the default is .05). |
These arguments pertain to the power of the tests:
theta |
optional numeric value to specify the value of the true effect size or outcome under the alternative hypothesis. If unspecified, it will be estimated based on the data or the value is taken from the |
tau2 |
optional numeric value to specify the amount of heterogeneity in the true effect sizes or outcomes. If unspecified, the true effect sizes or outcomes are assumed to be homogeneous or the value is taken from the |
These arguments pertain to the test of excess significance:
test |
optional character string to specify the type of test to use for conducting the test of excess significance. Possible options are |
tes.alternative |
character string to specify the sidedness of the hypothesis for the test of excess significance. Possible options are |
progbar |
logical to specify whether a progress bar should be shown (the default is |
tes.alpha |
alpha level for the test of excess significance (the default is .10). Only relevant for finding the ‘limit estimate’. |
Miscellaneous arguments:
digits |
optional integer to specify the number of decimal places to which the printed results should be rounded. |
... |
other arguments. |
The function carries out the test of excess significance described by Ioannidis and Trikalinos (2007). The test can be used to examine whether the observed number of significant findings is greater than the number of significant findings expected given the power of the tests. An overabundance of significant tests may suggest that the collection of studies is not representative of all studies conducted on a particular topic.
One can either pass a vector with the observed effect sizes or outcomes (via x
) and the corresponding sampling variances via vi
(or the standard errors via sei
) to the function or an object of class "rma"
.
The observed effect sizes or outcomes are tested for significance based on a standard Wald-type test, that is, by comparing \mjdeqnz_i = \fracy_i - \mboxH_0\sqrtv_iz_i = (y_i - H_0) / sqrt(v_i) against the appropriate critical value(s) of a standard normal distribution (e.g., \mjseqn\pm 1.96 for alternative="two.sided"
and alpha=.05
, which are the defaults). Let \mjseqnO denote the observed number of significant tests.
Given a particular value for the true effect or outcome denoted by \mjseqn\theta (which, if it is unspecified, is determined by computing the inverse-variance weighted average of the observed effect sizes or outcomes or the value is taken from the model object), let \mjseqn1-\beta_i denote the power of the \mjeqni\textrmthith test (where \mjseqn\beta_i denotes the Type II error probability). If \mjseqn\tau^2 > 0, let \mjseqn1-\beta_i denote the expected power (computed based on integrating the power over a normal distribution with mean \mjseqn\theta and variance \mjseqn\tau^2). Let \mjseqnE = \sum_i=1^k (1-\beta_i) denote the expected number of significant tests.
The test of excess significance then tests if \mjseqnO is significantly greater (if tes.alternative="greater"
) than \mjseqnE. This can be done using Pearson's chi-square test (if test="chi2"
), a binomial test (if test="binomial"
), or an exact test (if test="exact"
). The latter is described in Francis (2013). If argument test
is unspecified, the default is to do an exact test if the number of elements in the sum that needs to be computed is less than or equal to 10^6
and to do a chi-square test otherwise.
One can also iteratively find the value of \mjseqn\theta such that the p-value of the test of excess significance is equal to tes.alpha
(which is .10
by default). The resulting value is called the ‘limit estimate’ and is denoted \mjeqn\theta_lim\theta_lim by Ioannidis and Trikalinos (2007). Note that the limit estimate is not computable if the p-value is larger than tes.alpha
even if \mjeqn\theta = \mboxH_0\theta = H_0.
An object of class "tes"
. The object is a list containing the following components:
k |
the number of studies included in the analysis. |
O |
the observed number of significant tests. |
E |
the expected number of significant tests. |
OEratio |
the ratio of O over E. |
test |
the type of test conducted. |
pval |
the p-value of the test of excess significance. |
power |
the (estimated) power of the tests. |
sig |
logical vector indicating which tests were significant. |
theta |
the value of \mjseqn\theta used for computing the power of the tests. |
theta.lim |
the ‘limit estimate’ (i.e., \mjeqn\theta_lim\theta_lim). |
... |
some additional elements/values. |
The results are formatted and printed with the print
function.
When tes.alternative="greater"
(the default), then the function tests if \mjseqnO is significantly greater than \mjseqnE and hence this is indeed a test of excess significance. When tes.alternative="two.sided"
, then the function tests if \mjseqnO differs significantly from \mjseqnE in either direction and hence it would be more apt to describe this as a test of (in)consistency (between \mjseqnO and \mjseqnE). Finally, one can also set tes.alternative="less"
, in which case the function tests if \mjseqnO is significantly lower than \mjseqnE, which could be considered a test of excess non-significance.
When tes.alternative="two.sided"
, one can actually compute two limit estimates. The function attempts to compute both.
The function computes the significance and power of the studies based on Wald-type tests regardless of the effect size or outcome measure used as input. This works as an adequate approximation as long as the within-study sample sizes are not too small.
Note that the test is not a test for publication bias but a test whether the set of studies includes an unusual number of significant findings given the power of the studies. The general usefulness of the test and its usefulness under particular circumstances (e.g., when there is substantial heterogeneity in the true effect sizes or outcomes) has been the subject of considerable debate. See Francis (2013) and the commentaries on this article in the same issue of the journal.
Wolfgang Viechtbauer wvb@metafor-project.org https://www.metafor-project.org
Francis, G. (2013). Replication, statistical consistency, and publication bias. Journal of Mathematical Psychology, 57(5), 153–169. https://doi.org/10.1016/j.jmp.2013.02.003
Ioannidis, J. P. A., & Trikalinos, T. A. (2007). An exploratory test for an excess of significant findings. Clinical Trials, 4(3), 245–253. https://doi.org/10.1177/1740774507079441
Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1–48. https://doi.org/10.18637/jss.v036.i03
regtest
for the regression test, ranktest
for the rank correlation test, trimfill
for the trim and fill method, fsn
to compute the fail-safe N (file drawer analysis), and selmodel
for selection models.
### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=x.a, n1i=n.a, ci=x.p, n2i=n.p, data=dat.dorn2007)
### conduct test of excess significance (using test="chi2" to speed things up)
tes(yi, vi, data=dat, test="chi2")
### same as fitting an EE model and then passing the object to the function
res <- rma(yi, vi, data=dat, method="EE")
tes(res, test="chi2")
### illustrate limit estimate (value of theta where p-value of test is equal to tes.alpha)
thetas <- seq(0,1,length=101)
pvals <- sapply(thetas, function(theta) tes(yi, vi, data=dat, test="chi2", theta=theta)$pval)
plot(thetas, pvals, type="o", pch=19, ylim=c(0,1))
sav <- tes(yi, vi, data=dat, test="chi2")
abline(h=sav$tes.alpha, lty="dotted")
abline(v=sav$theta.lim, lty="dotted")
### examine significance of test as a function of alpha (to examine 'significance chasing')
alphas <- seq(.01,.99,length=101)
pvals <- sapply(alphas, function(alpha) tes(yi, vi, data=dat, test="chi2", alpha=alpha)$pval)
plot(alphas, pvals, type="o", pch=19, ylim=c(0,1))
abline(v=.05, lty="dotted")
abline(h=.10, lty="dotted")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.