mdd.chisq {MDD}R Documentation

MDD for Pearson's Chi-squared Test

Description

Finds the minimum detectable difference for a two-group, two-outcome experiment using a Pearson's chi-squared test statistic with continuity correction. Also computes the true treatment response rates closest to the control response rate that would be detected with a given power.

Usage

mdd.chisq(placebo.size, treat.size, prob.placebo, alpha = 0.05, pow = 0.8)

Arguments

placebo.size number of subjects in control group.
treat.size number of subjects in treatment group.
prob.placebo anticipated proportion of responses in control group.
alpha significance level.
pow power.

Value

A list with the following components:

actual true treatment reponse rate(s) that would be detected as significant, with power pow, at significance level alpha.
observed matrix with the number and proportion of observed treatment responses that would be significant, conditional on the number and proportion of observed control responses.

Author(s)

Don Barkauskas (barkda@wald.ucdavis.edu)

References

See chisq.test for references.

See Also

mdd.fisher.exact for an exact (conditional) test

gui.mdd for a GUI version

Examples

chisq <- mdd.chisq(20,40,.25)

#For a test at significance level 0.05 and power 80%, with 20 control 
#subjects and 40 treatment subjects and an assumed control response rate of 25%.

chisq$actual

#If the true treatment response rate is greater than 0.6635562, it will be 
#detected with 80% power.

chisq$observed

#For example, if there are 6 observed control repsonses (observed response rate 
#of 30%), then either 2 or fewer or 25 or more treatment responses (5% and 
#62.5% response rates, respectively) will be declared significant.
#
#Compare to mdd.fisher.exact(20,40,.25).

rm(chisq)

[Package MDD version 0.5 Index]