power_Beta {PASSED} | R Documentation |
Power Calculations for Test of Two Beta Means
Description
Compute the power for a test of two sample means with beta distributions, or determine the minimum sample size to obtain a target power.
Usage
power_Beta(n1 = NULL, n2 = NULL, power = NULL, sig.level = 0.05,
mu1 = NULL, sd1 = NULL, mu2 = NULL, equal.sample = TRUE,
trials = 100, equal.precision = TRUE, sd2 = NULL,
link.type = c("logit", "probit", "cloglog", "cauchit", "log", "loglog"))
Arguments
n1 |
sample size in group 1, or sample size in each group if |
n2 |
sample size in group 2 |
power |
power of test (1 minus Type II error probability) |
sig.level |
significance level (Type I error probability) |
mu1 |
sample mean of group 1 |
sd1 |
standard deviation for group 1 |
mu2 |
sample mean of group 2 |
equal.sample |
equal sample sizes for two groups, see details |
trials |
number of trials in simulation |
equal.precision |
equal dispersion parameter assumption in simulation |
sd2 |
standard deviation for group 2. Only applicable when |
link.type |
type of link used in the beta regression, see details |
Details
Exactly one of the parameters n1
, n2
and power
must be passed as NULL, and that parameter is determined from the others.
This function allows you to set the number of trials in the simulation to control the result accuracy,
and type of link used in the beta regression. You can choose one of the following: "logit", "probit", "cloglog", "cauchit", "log", "loglog".
Value
Object of class "power.htest", a list of the arguments (including the computed one) augmented with method and note elements.
Examples
# calculate power
power_Beta(mu1 = 0.5, mu2 = 0.80, sd1 = 0.25, n1 = 60)
# calculate sample size for both groups
power_Beta(mu1 = 0.5, mu2 = 0.80, sd1 = 0.25, power=0.8)