This is the main function you will call if you want to perform a publication bias / p-hacking analysis with derounded z-statistics. It allows flexible combinations of how a single derounded z vector is drawn, which statistics are computed for each combination of window h and derounded z-draw and how those statistics are aggregated over multiple replications.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | study.with.derounding(
dat,
h.seq = c(0.05, 0.075, 0.1, 0.2, 0.3, 0.4, 0.5),
window.fun = window.t.ci,
mode = c("reported", "uniform", "zda", "dsr")[1],
alt.mode = c("uniform", "reported")[1],
make.z.fun = NULL,
z0 = ifelse(has.col(dat, "z0"), dat[["z0"]], 1.96),
repl = 1,
aggregate.fun = "median",
ab.df = NULL,
z.pdf = NULL,
max.s = 100,
common.deci = TRUE,
verbose = TRUE
)
|
dat |
a data frame containing all observations. Each observation is a test from a regression table in some article. It must have the columns |
h.seq |
All considered half-window sizes |
window.fun |
The function that computes for each draw of a derounded z vector and a window h the statistics of interest. Examples are |
mode |
Mode how a single draw of derounded z is computed: "reported", "uniform","zda","dsr" or some custom name (requires ab.df to be defined) |
alt.mode |
Either "uniform" (DEFAULT) or "reported". Some derounding modes like "zda" and "dsr" cannot be well defined (or are too time-consuming to compute) for observations with many significant digits or outlier z-statistics. |
z0 |
The significance threshold for z |
repl |
Number of replications of each derounding draw. |
aggregate.fun |
How shall multiple replications be aggregated. Not yet implemented. Currently we always take the medians of each variale returned by window.fun of all replications. |
ab.df |
Required if |
z.pdf |
Required if |
max.s |
Used if |
common.deci |
Shall we assume that mu and sigma are given with the same number of decimal places. If |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.