graph.one.strat {MDD} | R Documentation |
Plots combinations of observed number of control and treatment responses that will be significant using Fisher's exact test. Will either plot a grid of the significant scenarios or a grid weighted by the probability of the scenarios occurring. In the latter case, the power of the test will also be displayed on the graph.
graph.one.strat(res.mat, weighted = FALSE, prob.placebo = NULL, prob.treat = NULL, show.grid = FALSE)
res.mat |
either a list like the one returned by mdd.fisher.exact , or
a matrix in the form of the observed component of such a list. |
weighted |
a logical indicating whether to weight the plot by probability. |
prob.placebo |
the assumed response rate in the control group. |
prob.treat |
the assumed response rate in the treatment group. |
show.grid |
a logical indicating whether to show a graph-paper-like grid on the plot. |
The resulting plot has all of the significant combinations in blue and the non-significant ones in white.
If weighted = TRUE
, then each significant result is colored with an area
proportional to its probability; thus, the total blue area is the power of the test,
which is also displayed on the graph.
No return value; the graph is simply plotted.
The values of prob.placebo
and prob.treat
are irrelevant if weighted = FALSE
.
Don Barkauskas (barkda@wald.ucdavis.edu)
see fisher.test
for references
gui.graph.one.strat
for a GUI version
fish.ex <- mdd.fisher.exact(20, 40, .25) graph.one.strat(fish.ex) x11() graph.one.strat(fish.ex, weighted = TRUE, .25, .6, show.grid = TRUE) rm(fish.ex)