Title: | Shiny app and function for Meta studies following Andrews and Kasy (2019). |
---|---|
Description: | This package mainly consists of Maximilan Kasy's code of his shiny app for MetaStudies on publication bias. I added some stuff, rewrote it a bit and put everything into an R package. The original code is here: https://github.com/maxkasy/MetaStudiesApp The code is based on Andrews and Kasy (2019). In particular, I added code to run misspecification tests that will be explained in Kranz and Pütz (2021). References: - Andrews, Isaiah and Maximilian Kasy. 2019. “Identification of and correction for publication bias.” American Economic Review 109 (8): 2766-94. - Kranz, Sebastian and Peter Pütz. 2021 “Rounding and other pitfalls in meta-studies on p-hacking and publication bias. A comment on Brodeur et al. (2020)”, working paper. |
Authors: | Maximilian Kasy, Sebastian Kranz |
Maintainer: | Sebastian Kranz <[email protected]> |
License: | Attribution-NonCommercial-ShareAlike 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode |
Version: | 0.1.0 |
Built: | 2024-12-05 02:55:55 UTC |
Source: | https://github.com/skranz/MetaStudies |
Note that this procedure can take very long to run.
bootstrap_specification_tests(X, sigma, B = 10, ..., num.cores = 1)
bootstrap_specification_tests(X, sigma, B = 10, ..., num.cores = 1)
X |
vector of parameters |
sigma |
vector of standard errors |
B |
number of bootstrap replications |
... |
parameters passed to |
num.cores |
number of cores used for parallel computation using |
Plot
estimates_plot( ms, X = ms$X, sigma = ms$sigma, cutoffs = ms$cutoffs, symmetric = ms$symmetric, model = ms$model )
estimates_plot( ms, X = ms$X, sigma = ms$sigma, cutoffs = ms$cutoffs, symmetric = ms$symmetric, model = ms$model )
Perform Andrews and Kasy (2019) estimation
metastudies_estimation( X, sigma, cutoffs = c(1.96), symmetric = FALSE, model = "normal", eval.max = 10^5, iter.max = 10^5, abs.tol = 10^(-8), stepsize = 10^(-6) )
metastudies_estimation( X, sigma, cutoffs = c(1.96), symmetric = FALSE, model = "normal", eval.max = 10^5, iter.max = 10^5, abs.tol = 10^(-8), stepsize = 10^(-6) )
X |
vector of reported coefficients |
sigma |
vector of reported stanard errors |
cutoffs |
significance thresholds that define intervals of different publication probabilities, e.g. |
symmetric |
if TRUE assume that positive and negative z-statistics are symmetrically distributed. |
model |
either "normal" or "t". The assumed functional form of the distribution absent publication bias. |
eval.max , iter.max , abs.tol
|
Control parameters for [stats::nlminb]. |
Create and run the MetaStudies shiny app
MetaStudiesApp(csv.file = NULL, show.cor = TRUE, ...)
MetaStudiesApp(csv.file = NULL, show.cor = TRUE, ...)
csv.file |
if not NULL a file that will be initially used by the app |
show.cor |
if TRUE add a tabPanel with correlations between estimates and standard errors to get better insights whether the independence assumption of Andrews & Kasy (2019) may be violated in the given data set. |
... |
additional parameters passed to |
A crucial assumption of Andrews and Kasy (2019) is that in the unobserved latent distribution without publication error the estimate and its standard error are statistically independent from each other.
metastudy_X_sigma_cors(ms)
metastudy_X_sigma_cors(ms)
ms |
An object returned from the function |
While the latent distribution cannot be observed, this function computes some correlations that may indicate problems with respect to this assumption. We use an inverse probability weighting approach. More precisely, it weights inversely with the estimated publication probabilities to recover the correlation in the unobserved latent distribution. (This approach was suggested in an email by Isaiah Andrews and implemented by Sebastian Kranz).
To compute standard errrors via bootstrap (very time consuming),
call the function bootstrap_specification_tests
.
a data frame with correlations, confidence intervals and also relevent results from a linear regression of standard errors on estimates.