- experimental design
- statistical philosophy
- statistical tests & assumptions
- analysis platforms

11 November 2021
apropos("^power") ## base-R functions library("sos"); findFn("{power analysis}")
With \(n=15\) per group, are we likely to see a clear difference between 10% (control) and 20% (treatment) mortality (a doubling of mortality)?
power.prop.test(n=15,p1=0.1,p2=0.2)
## ## Two-sample comparison of proportions power calculation ## ## n = 15 ## p1 = 0.1 ## p2 = 0.2 ## sig.level = 0.05 ## power = 0.1141268 ## alternative = two.sided ## ## NOTE: n is number in *each* group
Uh-oh!
How many samples per group would we need to get power=0.8?
power.prop.test(power=0.8,p1=0.1,p2=0.2,sig.level=0.05)
## ## Two-sample comparison of proportions power calculation ## ## n = 198.9634 ## p1 = 0.1 ## p2 = 0.2 ## sig.level = 0.05 ## power = 0.8 ## alternative = two.sided ## ## NOTE: n is number in *each* group
Uh-oh!
what should we do?
(or “researcher degrees of freedom” (Simmons et al. 2011))
1978 automobile data (Chambers et al. 2018)
(1) | ||
---|---|---|
(Intercept) | 8.010 | (6.206) |
mpg | -0.187 * | (0.088) |
trunk | -0.013 | (0.105) |
length | 0.055 | (0.036) |
turn | -0.200 | (0.140) |
N | 74 | |
R2 | 0.251 | |
logLik | -173.832 | |
AIC | 359.665 | |
*** p < 0.001; ** p < 0.01; * p < 0.05. |
(more here)
performance
pkg)x1 = c(1.5,2.5,2.1) x2 = c(1.1,1.4,1.5) t.test(x1,x2)
## ## Welch Two Sample t-test ## ## data: x1 and x2 ## t = 2.226, df = 2.6648, p-value = 0.1236 ## alternative hypothesis: true difference in means is not equal to 0 ## 95 percent confidence interval: ## -0.3759079 1.7759079 ## sample estimates: ## mean of x mean of y ## 2.033333 1.333333
Brice, EM et al. 2021.. Ecology Letters n/a (n/a). doi:10.1111/ele.13915. https://onlinelibrary.wiley.com/doi/abs/10.1111/ele.13915.
Chambers, JM et al. 2018. Graphical methods for data analysis. Chapman; Hall/CRC.
Davies, GM et al. 2015.. Ecology and Evolution (October). doi:10.1002/ece3.1782. http://onlinelibrary.wiley.com/doi/10.1002/ece3.1782/abstract.
Dushoff, J et al. 2018. (October). https://arxiv.org/abs/1810.06387.
Gelman, A et al. 2014.. Perspectives on Psychological Science 9 (6) (November): 641–651. doi:10.1177/1745691614551642. http://pps.sagepub.com/content/9/6/641.
———. 2014.. American Scientist 102 (6): 460. http://link.galegroup.com/apps/doc/A389260653/AONE?u=ocul_mcmaster&sid=AONE&xid=4f4562c0.
———. 2006.. The American Statistician 60 (4) (November): 328–331. doi:10.1198/000313006X152649. http://www.tandfonline.com/doi/abs/10.1198/000313006X152649.
Hurlbert, SH. 1984.. Ecological Monographs 54 (2) (June): 187–211. doi:10.2307/1942661. http://www.esajournals.org/doi/abs/10.2307/1942661.
Ioannidis, JPA. 2005.. PLoS Med 2 (8): e124. doi:10.1371/journal.pmed.0020124. http://dx.doi.org/10.1371/journal.pmed.0020124.
McCullough, BD et al. 2008.. Computational Statistics & Data Analysis 52 (10) (June): 4570–4578. doi:10.1016/j.csda.2008.03.004. http://www.sciencedirect.com/science/article/pii/S0167947308001606.
Simmons, JP et al. 2011.. Psychological Science 22 (11) (November): 1359–1366. doi:10.1177/0956797611417632. http://pss.sagepub.com/content/22/11/1359.
Student. 1927.. Biometrika 19 (1/2) (July): 151–164. doi:10.2307/2332181. http://www.jstor.org/stable/2332181.