phnorm | R Documentation |
Density, distribution, and random variate generation for the p-hacking meta- analysis model.
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
)
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 |
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.
dphnorm
gives the density, pphnorm
gives the distribution
function, and rphnorm
generates random deviates.
Moss, Jonas and De Bin, Riccardo. "Modelling publication bias and p-hacking" Forthcoming (2019)
rphnorm(100, theta = 0, sigma = 0.1, eta = c(1, 0.5, 0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.