-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic power analysis feature? #599
Comments
Sure. With our bootstrap CI features, we can also do simulation based power/precision analyses pretty easily |
We should also look at @debruine's faux package https://debruine.github.io/faux/) and powerlmm. |
The
Um, we don't have those 😅 (yet? #578)
Yup - |
Fully agree, even mixed models are borderline IMO - Starting with basic h-tests would already be a useful feature |
Guess I was thinking of parameters? |
Hi all - its been a while, but I have been thinking about this a little. Here's an idea. Is this along the lines of what you're thinking @DominiqueMakowski ?
|
Hi all - I cleaned up the code a bit. Here's a newer and faster version. Let me know thoughts and I can starting working on it and open a pull shortly, only if it would add value to the ES ecosystem:
|
To reiterate my previous point, instead of having these functions baked in (which can only cover simple cases, already covered by |
As I am not a user / expert in this type of stuff, I don't have a strong opinion regarding its implementation. In any case, a vignette would definitely be useful. Maybe it can be a starting point, and during the development of the vignette we will see whether there is a need for an easystatsification (adding features to help, support or report existing tools). |
Many thanks to you both. I agree and am fine with that approach. I am already working on the vignette. I'll share via PR when I have something worth sharing, at which point others can review as they'd like |
Here's (an old) script I used to teach how power analysis and simulations are similar. It contains German comments (maybe Deepl can help you), I probably can translate into English: https://gist.github.com/strengejacke/1eaa54ea1fc235b0523373c0245912da It shows a simple example for t-tests, and later how to calculate the power for model parameters (and compares the results to an Anova table that includes power per parameters). Based on this, you can go on to more complex scenarios for power calculations. |
Thanks @strengejacke - super helpful! This is very similar to my approach, which I am revising now. Stand by for more. |
Adding a vignette on the value of statistical power as well as the role of `effectsize` in making this an easy thing to do via easystats#599 Other changes include: adding three new refs to `bibliography.bib`, adding myself as ctb, and fixing a few typos here and there. **Note**: Need to change version number? Didn't think so with only the inclusion of a new vignette, but feel free to bump if needed.
# Description Adding a vignette on the value of statistical power as well as the role of `effectsize` in making this an easy thing to do via easystats#599 # Proposed Changes In addition to adding new vignette (`statistical_power.Rmd`), other changes include: - adding three new refs to `bibliography.bib` - adding myself as ctb in `DESCRIPTION - fixing a few typos here and there # Question **Note**: Need to change version number? Didn't think so with only the inclusion of a new vignette, but feel free to bump if needed.
@DominiqueMakowski - I have never heard the term "fireplot" before. but if you mean a heatmap, you could create something like this:
which gives: Is this what you mean? |
Haha! I found the tweet I was thinking of: https://x.com/dsquintana/status/1641339624231501824?s=20 but it seems like it's mostly (?) for meta-analyses That said, I think this type of plot is my fav: Also, here are some other vignettes for inspiration:
|
I am pretty pumped I created that one before I saw your tweet example 😃 I am happy to pull something together to expand the viz capability for power analysis in the package, though it seems like @mattansb doesn't want to add too much re: power analysis to |
* adding power vignette # Description Adding a vignette on the value of statistical power as well as the role of `effectsize` in making this an easy thing to do via #599 # Proposed Changes In addition to adding new vignette (`statistical_power.Rmd`), other changes include: - adding three new refs to `bibliography.bib` - adding myself as ctb in `DESCRIPTION - fixing a few typos here and there # Question **Note**: Need to change version number? Didn't think so with only the inclusion of a new vignette, but feel free to bump if needed. * Update bibliography.bib updating bib for pwaggoner's new power vignette * Update DESCRIPTION adding pwaggoner * Update standardized_differences.Rmd small typo and grammatical fixes * Update statistical_power.Rmd fixing some linting issues * Update vignettes/statistical_power.Rmd Co-authored-by: Dominique Makowski <[email protected]> * Update statistical_power.Rmd fixed warning issues * fix vignette * evaluate vignette conditionally * suppress warnings * Update standardized_differences.Rmd reverting two small changes back to fix lint issues * Update statistical_power.Rmd * Update statistical_power.Rmd * Update statistical_power.Rmd * Update statistical_power.Rmd * Update README.md cleaning up CRAN links for lint link rot fail * Update statistical_power.Rmd update per Dom's disclaimer suggestion * Update _pkgdown.yml * Update statistical_power.Rmd made changes responding to recent code review * update vignette --------- Co-authored-by: Dominique Makowski <[email protected]> Co-authored-by: Indrajeet Patil <[email protected]> Co-authored-by: Mattan S. Ben-Shachar <[email protected]> Co-authored-by: Mattan S. Ben-Shachar <[email protected]>
We now have a power vignette, that can be expanded on to more examples of using Thanks @pdwaggoner !
I think a good place for this would actually be to contribute to the out <- pwr::pwr.t.test(n = 100, d = 0.3)
plot(out) Alternatively, if we want that capability in-house, it could be implemented in |
Or we add a |
Disclaimer:
And yet most papers still use G*Power and basic tools rather than complicated simulation-based approaches.
I wouldn't mind a simple and intuitive function in effectsize to do some basic stuff, like:
This would return the minimum number of observations to detect that effect. We could add some cool power analysis curve plots in
see
. What do you think?The text was updated successfully, but these errors were encountered: