Description Usage Arguments Details Value Examples
Find minimum sample sizes with Beta DBN and given mu0,sd0,mu1 and target powers.
1 2 | sample.size(mu0, sd0, mu1.start, mu1.end, mu1.by, power.start, power.end, power.by,
sig.level = 0.05, trials = 100, accuracy = NuLL, seed = 1, 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 |
power.start |
the starting value of target power |
power.end |
the ending value of target power |
power.by |
the step length of target power |
sig.level |
significant level; default value is 0.05 |
trials |
the number of trials; default value is 100 |
accuracy |
the accuracy of the result; must be integer |
seed |
the seed used in the simulation |
link.type |
link options include: "logit", "probit", "cloglog", "log", "loglog", "wilcoxon". Default link is "logit". |
The sample.size function allows you to control the number of trials in the simulation, the target power, accuracy, and the alternative means. You can fix the alternative and vary power to match a desired sample size; Use default values for the number of trials and accuracy for a quick view; Use a larger number of trials (say 1000) and a smaller accuracy (say 1) to get better estimates.
Return a matrix including minimum sample size and power, as well as the target power and mu1:
minimum sample size: link type: |
minimum sample size for given given mu0, sd0, mu1, target power and type of link. |
minimum power: link type: |
the minimum power greater than or equal to target power. |
target power: |
the target power. |
mu1: |
mean for the treatment group under the alternative. |
mu0: |
the mean for the control group. |
sd0: |
the standard deviation for the control group. |
1 2 3 4 5 6 | sample.size(mu0=0.56, sd0=0.255, mu1.start = 0.60, mu1.end = 0.70, mu1.by = 0.05,
power.start = 0.7, power.end = 0.9, power.by = 0.1)
sample.size(mu0=0.56, sd0=0.255, mu1.start = 0.60, mu1.end = 0.70, mu1.by = 0.05,
power.start = 0.7, power.end = 0.9, power.by = 0.1, link.type = c("logit","loglog","log"))
sample.size(mu0=0.56, sd0=0.255, mu1.start = 0.60, mu1.end = 0.70, mu1.by = 0.05,
power.start = 0.7, power.end = 0.9, power.by = 0.1, link.type = "all")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.