mdd.t.test {MDD} | R Documentation |
Calculates minimum detectable difference for a two-sample t-test with equal variances.
mdd.t.test(n1, n2, mu1, sigma, alpha = 0.05, alternative = "two.sided", return.cis = FALSE)
n1,n2 |
number of subjects in each sample. |
mu1 |
anticipated mean in sample 1 (control). |
sigma |
assumed common standard deviation. |
alpha |
significance level. |
alternative |
indicates the alternative hypothesis and must be one of "two.sided" ,
"greater" or "less" . You can specify just the initial letter. |
return.cis |
a logical which indicates whether to return endpoints of confidence intervals or just the MDD. |
alternative = "less"
is the alternative that has the treatment group mean
less than the control group mean.
If return.cis = FALSE
, the returned value is the MDD.
If return.cis = TRUE
, the returned value is a numeric vector of length two
giving the closest values to mu1
that would be significant given the remaining
parameters.
For unequal variances, use mdd.satterthwaite
Don Barkauskas (barkda@wald.ucdavis.edu)
gui.mdd
for a GUI version
mdd.t.test(20, 15, 3.1, .5) mdd.t.test(20, 15, 3.1, .5, return.cis=TRUE)