power_Gamma {PASSED}R Documentation

Power Calculations for Test of Two Gamma Means

Description

Compute the power for a test of two sample means with Gamma distributions, or determine parameters to obtain a target power.

Usage

power_Gamma(n1 = NULL, n2 = NULL, power = NULL, sig.level = 0.05, 
mu1 = NULL, mu2 = NULL, gmu1 = NULL, gmu2 = NULL, trials = 100, 
M = 10000, equal.sample = TRUE, equal.shape = NULL, trace = FALSE)

Arguments

n1

sample size in group 1, or sample size in each group if equal.sample = TRUE

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

arithmetic mean of group 1

mu2

arithmetic mean of group 2

gmu1

geometric mean of group 1

gmu2

geometric mean of group 2

trials

number of trials in simulation

M

number of simulations used in CAT method, see Chang (2011)

equal.sample

equal sample sizes for two groups, see details

equal.shape

assume the shape parameters are equal for two groups, see details

trace

if positive, sample size and power are printed during the running of each simulation

Details

Exactly one of the parameters n1, n2, and power must be passed as NULL, and that parameter is determined from the others. Notice that sig.level has non-NULL defaults, so NULL must be explicitly passed if you want to compute it.

If equal.sample = TRUE is used, N in output will denote the number in each group.

The equal shape parameter assumption will be tested automatically; otherwise it could be set manually with equal.shape.

Value

Object of class "power.htest", a list of the arguments (including the computed one) augmented with method element.

References

Chang et al. (2011). Testing the equality of several gamma means: a parametric bootstrap method with applications. Computational Statistics, 26:55-76.

Examples

# Calculate power, equal sizes
power_Gamma(n1 = 50, mu1 = 1, mu2 = 1.5, gmu1 = 0.6, gmu2 = 0.6, M = 100)

[Package PASSED version 1.2-2 Index]