exactbinomPlot {exactci}R Documentation

Plot p-value function for one binomial response.

Description

Plots p-values as a function of different point null hypothesis values for p. For two-sided p-values, can plot three types of p-values: the minimum likelihood method (default for binom.test), the central method (i.e., twice the one-sided exact p-values), and Blaker's exact.

Usage

exactbinomPlot(x, n, p = NULL, ndiv = 1000, 
    tsmethod = "central", pRange = c(0, 1), 
    dolines = FALSE, dopoints = TRUE, doci=TRUE, 
    alternative=c("two.sided","less","greater"),
    relErr=1+10^(-7), conf.level=.95, alphaline=TRUE, 
    newplot = TRUE, midp=FALSE, ...)

Arguments

x

number of successes, or a vector of length 2 giving the numbers of successes and failures, respectively

n

number of trials, ignored if x has length 2

p

null values of p for plot, if NULL divides pRange into ndiv pieces

ndiv

number of pieces to divide up range of x-axis

tsmethod

two-sided method for p-value calculation, either "minlike","blaker" or "central"

pRange

range for plotting null hypothesis values of p

dolines

logical, add lines to a plot?

dopoints

logical, add points to a plot?

doci

logical, add lines for confidence interval?

alternative

type of alternative for p-values

relErr

number close to 1, avoids problems with ties, see binomControl

conf.level

confidence level for use when doci=TRUE

alphaline

logical, if doci=TRUE should a line be drawn at significance level

newplot

logical,start a new plot?

midp

logical, use mid-pvalues? See link{binom.exact}

...

values passed to plot, points, or lines statement

See Also

binom.exact

Examples

## plot central two-sided p-values (double one-sided p-values)
## for 5 positive responses out of 17 tries
exactbinomPlot(5,17)
## add blakers exact p-values
## pch option acts on points, lty acts on ci lines
exactbinomPlot(5,17,tsmethod="blaker",col="blue",pch=".",lty=2,newplot=FALSE)

## can plot one-sided p-values, tsmethod is ignored
exactbinomPlot(5,17,alternative="less")


[Package exactci version 1.4-4 Index]