Description Usage Arguments Value Author(s) See Also Examples
Calculates the Negative Binomial size parameter s2
such that the variance of the distribution
with mean mu2
and size s2
is the same as the Negative Binomial distribution with mean
mu1
and size s1
. This can be useful when computing power for a Negative Binomial
distribution in the packages power.groups
and power.BACI
.
1 | size2.samevar(mu1, mu2, s1)
|
mu1 |
Negative Binomial mean for group 1 |
mu2 |
Negative Binomial mean for group 2 |
s1 |
Negative Binomial size for group 1 |
The size for group 1.
Jon Barry: Jon.Barry@cefas.co.uk
1 2 3 4 5 6 7 | mu1=5; mu2=10; s1=3
s2 = size2.samevar(mu1, mu2, s1)
s2
# Check variances are the same
v1 = mu1 + mu1^2 / s1
v2 = mu2 + mu2^2 / s2
v1; v2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.