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

It is possible to calculate the achieved power for a given sample sizes on each arm? #4

Open
bljm opened this issue Nov 6, 2024 · 0 comments

Comments

@bljm
Copy link

bljm commented Nov 6, 2024

Dear Sir:
Thank you very much for your excellent package! I was wondering if it's possible to directly obtain the achieved power given different sample sizes for each arm, while specifying a particular configuration for correction and power. For example, I tried to calculate the achieved power for the toy example you provided, as follows using the internal functions:

des <- des_ss_norm(K    = 3,
                   alpha      = 0.05,
                   beta       = 0.2,
                   delta1     = 1,
                   sigma      = rep(1, 4),
                   ratio      = rep(1, 3),
                   correction = "dunnett",
                   power      = "marginal")

comp <- build_ss_norm(n = c(16.86988,16.86988,16.86988,16.86988), alpha = 0.05, beta = 0.2,
                          delta1 = 0.5, delta0 = 0, sigma = rep(1, 3 + 1),
                          correction = "dunnett", power = "marginal",
                          summary = F)

comp$outcome<-"norm"
comp<-multiarm:::components_ss_power_setup(comp)
comp   <- multiarm:::components_ss_distribution(comp)
comp <-   multiarm:::components_ss_update(comp)

pwr_marginal <- multiarm:::root_power_ss(N=50,comp)

In the last line, I attempted to calculate the target power for a reduced total sample size of N=50. However, the root_power function doesn't seem to work as expected. Is it possible to obtain the achieved power if I specify the correct comp object, or have I perhaps misunderstood the procedure in your package?

Many thanks in advance for any clarification, and for any light on how to do this if it's possible.

Kind regards,

Johanna

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

1 participant