Description Usage Arguments Value Examples
Simulates the "winner's curse"—the effect that especially in low-power situations, estimates that result in signficant tests for the null hypothesis of theta = 0 tend also to be overestimates. In each simulation, a single normal sample is drawn and the hypothesis that the true effect size is zero is tested(by one-sample t-test). The output is a named vector with a a true effect size (measured in number of standard deviations from the value under the null hypothesis), the "estimated" effect size, which is the mean effect size from simulations that produced significant results, and the power, which is the proportion of simulations that achieved significance. A histogram is also produced, with all the estimated effect sizes shown, and the estimates associated with significant tests colored grey.
1 | wincurse.sim.1sz(n, nsim, d, lev = 0.05, abs.vals = FALSE, br = 50)
|
n |
The size of each simulated sample. |
nsim |
The number of simulated samples to run. |
d |
The true effect size in the simulations. |
lev |
The significance level of the one-sample z-test. Effect size estimates are averaged in the "estimated d" part of the output only if the one-sample z test produces a p value less than the level. |
abs.vals |
controls whether we pay attention to the sign of the estimate (if FALSE, the default, we do). |
br |
the breaks parameter for the histogram. |
a named vector with a a true effect size (measured in number of standard deviations from the value under the null hypothesis), the "estimated" effect size, which is the mean effect size from simulations that produced significant results, and the power, which is the proportion of simulations that achieved significance. A histogram is also produced, with all the estimated effect sizes shown, and the estimates associated with significant tests colored grey.
1 2 | wincurse.sim.1sz(d = 0.1, n = 100, nsim = 10000)
wincurse.sim.1sz(d = 0.1, n = 100, nsim = 10000, abs.vals = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.