| phnorm {publipha} | R Documentation |
p-hacking Meta-analysis Model
Description
Density, distribution, and random variate generation for the p-hacking meta- analysis model.
Usage
dphnorm(x, theta, sigma, alpha = c(0, 0.025, 0.05, 1), eta, log = FALSE)
rphnorm(n, theta, sigma, alpha = c(0, 0.025, 0.05, 1), eta)
pphnorm(
q,
theta,
sigma,
alpha = c(0, 0.025, 0.05, 1),
eta,
lower.tail = TRUE,
log.p = FALSE
)
Arguments
x, q |
vector of quantiles. |
theta |
vector of means. |
sigma |
vector of study standard deviations. |
alpha |
vector of thresholds for p-hacking. |
eta |
vector of p-hacking probabilities, normalized to sum to 1. |
log, log.p |
logical; If |
n |
number of observations. If |
lower.tail |
logical; If |
Details
These functions assume one-sided selection on the effects. alpha contains
the selection thresholds and eta the vector of p-hacking
probabilities. theta is the true effect, while sigma is the true
standard deviation before selection.
Value
dphnorm gives the density, pphnorm gives the distribution
function, and rphnorm generates random deviates.
References
Moss, Jonas and De Bin, Riccardo. "Modelling publication bias and p-hacking" Forthcoming (2019)
Examples
rphnorm(100, theta = 0, sigma = 0.1, eta = c(1, 0.5, 0.1))