exact2x2Plot | R Documentation |
Plots two-sided p-values as a function of odds ratios. Can plot three types of p-values: the two-sided Fisher's exact, the central Fisher's exact (i.e., twice the one-sided Fisher's exact), and Blaker's exact.
exact2x2Plot(x, y=NULL, OR = NULL, ndiv = 1000, tsmethod=NULL,
method = NULL, paired=FALSE, orRange = NULL, dolog = TRUE,
dolines = FALSE, dopoints = TRUE, doci=TRUE,
alternative=c("two.sided","less","greater"),
conf.level=.95, alphaline=TRUE, newplot = TRUE, ...)
x |
matrix representing the 2 by 2 table |
y |
a factor object; ignored if |
OR |
odds ratio values for plot, if NULL divides orRange into ndiv pieces |
ndiv |
number of pieces to divide up odds ratio range |
tsmethod |
either "minlike","blaker" or "central" |
method |
same as tsmethod, kept for backward compatability |
paired |
logical, do paired analysis giving McNemar's test p-values |
orRange |
range for calculating odds ratios |
dolog |
logical,plot odds ratios on log scale? |
dolines |
logical, add lines to a plot? |
dopoints |
logical, add points to a plot? |
doci |
logical, add vertical lines at confidence interval? |
alternative |
one of "two.sided","less","greater", type of alternative for p-values |
conf.level |
when doci=TRUE, level for confidence interval to be plotted |
alphaline |
logical, if doci=TRUE should a line be drawn at the significance level? |
newplot |
logical,start a new plot? |
... |
values passed to plot, points, or lines statement |
exact2x2
example1<-matrix(c(6,12,12,5),2,2,dimnames=list(c("Group A","Group B"),c("Event","No Event")))
example1
exact2x2Plot(example1)
## add lines from central Fisher's exact
exact2x2Plot(example1,method="central",dolines=TRUE,newplot=FALSE,col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.