Description Usage Arguments Details Value Examples
Find the power for a given sample size when testing the null hypothesis that the means for the control and treatment groups are equal against a two-sided alternative.
1 2 | betapower(mu0, sd0, mu1.start, mu1.end, mu1.by,
ss.start, ss.end, ss.by, trials, seed, link.type="logit")
|
mu0 |
the mean for the control group |
sd0 |
the standard deviation for the control group |
mu1.start |
the starting value of mean for the treatment group under the alternative mu1 |
mu1.end |
the ending value of mean for the treatment group under the alternative mu1 |
mu1.by |
the step length of mean for the treatment group under the alternative mu1 |
ss.start |
the starting value of sample size |
ss.end |
the ending value of sample size |
ss.by |
the step length of sample size |
trials |
the number of trials |
seed |
the seed used in the simulation |
link.type |
the type of link used in the beta regression. Default value is "logit", or you can choose one or more of the following: "logit", "probit", "cloglog", "cauchit", "log", "loglog", "all" |
betapower function allows you to control the number of trials in the simulation, the sample sizes used, and the alternative means. You can fix the alternative and vary sample size to match a desired power; You can fix the sample size and vary the alternative to see which will match a desired power; You can vary both; Start with a small number of trials (say 100) to determine the rough range of sample sizes or alternatives; Use a larger number of trials (say 1000) to get better estimates.
Return a matrix with 7 to 12 columns:
power.of.GLM: link name |
the power using regression method; it will return the power with every links if you use link.type = "all" statement. |
power.of.Wilcoxon.test |
the power from Wilcoxon Rank sum test. |
sample size |
sample size. |
mu1 |
the mean for the treatment group under the alternative. |
mu0 |
the mean for the control group. |
sd0 |
the standard deviation for the control group. |
trials |
the number of trials. |
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.