Edit: this question is not:
- about programming
- About post-hoc power analysis (at least not with the intent to use sample statistics in post-hoc analysis - I have pretty good population estimates and I want to show people to USE those)
This question is about:
- proper use of a common tool used extensively in the scientific community.
- Checking assumptions and approximations, including tacit ones, in this (or any other) tool.
As such, I believe closing this question (without even providing any hint of where and how to get it answered) actually hurts this community, by communicating the message that these checks are superfluous, while they really should be at the top of the list of priorities.
I hope this plea will get this reopened.
——————————-
Is the pwr
package implemented with the small sample approximations (e.g. degrees of freedom in 1-sample t-test) described in Cohen 1988 or not? I can’t seem to find this in the docs.
If so, is there be a better choice for very small sample size power calculations?
Thanks for your reply.
———————
Optional reading: motivation for my question:
At work (manufacturing operation), we find it difficult to reproduce test results. To me it is clear that this is because we run severely underpowered studies. And my boss agreed that I should figure some stuff out.
I want to calculate power for some typical experimental “designs” we use.
The pwr
package in R looks very convenient. The vignette references the book of Cohen: Statistical Power Analysis for the Behavioral Sciences (1988). The different field of application should have the same math, but I decided to check the book out anyway.
I notice some approximations in the book, which are valid when “small sample size” means > 30. For me, “very large sample size” sometimes means 10. I noticed the approximation now for 1-sample t-test and for paired t-test: the book mentions that it does not have tables with the correct degrees of freedom. Which leads to a really small difference for n > 30, but I suspect the approximation is probably not valid for n < 10. And I would like to check. Hence my question.
———————-
Edit: one of the comments asked for quotes, which is reasonable.
I quote from Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.), as referenced in the pwr
package.
here are two examples where Cohen mentions the use of an approximation: A not so severe example in footnote 1 on page 42 on t-test with unequal sample sizes: “This is because the table is treating the t test for n as based on df = 2n' - 2, when there are actually df=nA +nB - 2, a larger value.”
Page 46, on one-sample t-test has a more severe example: “The power tables were computed on the basis that n is the size of each of two samples and that therefore the t test would be based on 2(n- 1) degrees of freedom. In the one-sample case, t is perforce based on only n - 1 degrees of freedom.” And: “unless the sample size is small (say less than 25 or 30), the effect of the underestimation of the degrees of freedom is negligible.”
Note that I agree with this analysis and approximation. In my situation, however, I may be led astray, since I violate one of the conditions. Changing something that’s wrong into something that’s also wrong is not an improvement, so I would like to avoid that.
With modern computers, these approximations are no longer needed - but I could not to find in the docs whether the the R package is written with or without the approximation.
I know what we should do, but getting sample sizes of >20 will be extremely rare for us. Then again, we cán modify our experiments to get Effect Sizes that are larger than what Cohen considers as “large”. I just need to explain/motivate to people that we should do that. It WILL take effort to reach that point.
pwr
package does not use tabulations internally; instead, it computes the relevant powers/sample sizes exactly (give or take tiny floating-point accuracy issues). My strong guess is that once you accept the approximations inherent in making the test assumptions (Normal distribution, independence, etc.),pwr
gives you answers that are as exact as possible. $\endgroup$