2.3 KiB
Exercise: Power simulation and power curves for t-test
Temporal value asymmetry
“participants … were asked to imagine that they had agreed to spend 5 hr
entering data into a computer and to indicate how much money it would be
fair for them to receive. Some participants imagined that they had
completed the work 1 month previously, and others imagined that they
would complete the work 1 month in the future . . . Participants
believed that they should receive 101% more money for work they would do
1 month later (M = \$125.04) than for identical work that they had
done 1 month previously (M = \$62.20), t(119) = 2.22, p = .03,
$d = 0.41$” (Caruso, Gilbert, and Wilson 2008, 797)
Plan a direct replication
- What is a plausible standard deviation? Hint:
d = (M1 − M2)/SD - What is an interesting minimal effect size (in $, Euro, or min)?
- Simulate responses for 120 participants in both the past and the future condition, assuming normal distributions with the same variance. Use the standard deviation and the minimal effect size from 1. and 2.
- Parameter recovery: Repeat the simulation from 3. 2000 times to
re-estimate the parameters (
\mu_1, \mu_2, \sigma) from the simulated responses. Visualize the recovered parameters in box plots.
Hint:SE = 2/\sqrt{n} \cdot SD, wherenis the total sample size.
t <- t.test(x, y, mu = 0, var.equal = TRUE)
c(t$estimate, sd.pool = sqrt(n) / 2 * t$stderr)
- Power simulation: Increase the total sample size to find out the
nnecessary for 80% power for the t-test. - Power curves:
- Write an
Rfunction that takes sample sizen, minimal effectd, standard deviationsd, and number of replicationsnrepas arguments. It should return the simulated power. - Use this function to simulate the power for each combination of 4 different standard deviations and 4 sample sizes.
- Visualize these power curves in a single plot.
- Write an
References
Caruso, E. M., D. T. Gilbert, and T. D. Wilson. 2008. “A Wrinkle in Time: Asymmetric Valuation of Past and Future Events.” Psychological Science 19 (8): 796–801. https://doi.org/10.1111/j.1467-9280.2008.02159.x.