Skip to content
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

Equivalent of power for presize functions #95

Open
aghaynes opened this issue May 3, 2022 · 3 comments
Open

Equivalent of power for presize functions #95

aghaynes opened this issue May 3, 2022 · 3 comments

Comments

@aghaynes
Copy link
Member

aghaynes commented May 3, 2022

Power is currently ca 50% - half the trials will find a larger CI

Could abuse the closed formulae to estimate the power...

> mu <- 5
> sd <- 2
> n <- 20
> presize::prec_mean(mu, sd, n)

     precision for mean 

  mean sd  n conf.width conf.level      lwr      upr
  1    5  2 20   1.872058       0.95 4.063971 5.936029

> power.t.test(delta = 0.94, sd = 2, power = .5, sig.level = .05, type = "one.sample")

     One-sample t test power calculation 

              n = 19.3697
          delta = 0.94
             sd = 2
      sig.level = 0.05
          power = 0.5
    alternative = two.sided

> power.t.test(delta = 0.94, sd = 2, power = .8, sig.level = .05, type = "one.sample")

     One-sample t test power calculation 

              n = 37.49745
          delta = 0.94
             sd = 2
      sig.level = 0.05
          power = 0.8
    alternative = two.sided
@aghaynes
Copy link
Member Author

aghaynes commented Mar 5, 2024

Paper: Probabilistic precision calculations for the planning of studies assessing negative binomial rates
https://onlinelibrary.wiley.com/doi/10.1002/pds.5750
R code as supplement to the paper

Potential new rate method too?

@lindeloev
Copy link

+1 for this feature. The probability of obtaining a CI of at most the desired width is often called "assurance". It's built into many SAS PROC POWER procedures where it's called "probwidth". I like "assurance" better, though "power" may be OK too.

@aghaynes
Copy link
Member Author

Thanks @lindeloev! I'm not a SAS user, so this is news to me. Assurance does seem to be a nice term for it. Power just brings the whole baggage from testing with it, which is not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants