exactci-internal | R Documentation |
These functions give p-values for exact binomial or poisson test. Not to be called directly, use binom.exact
or
poisson.exact
exactbinomPvals(x, n, p, relErr = 1 + 10^(-7), tsmethod = "minlike",midp=FALSE)
exactpoissonPval(x,T=1,r=1,relErr=1+1e-07,tsmethod="central")
exactpoissonPvals(x,T=1,r=1,relErr=1+1e-07,tsmethod="central")
exactbinomCI(x, n, tsmethod="minlike",conf.level=.95,tol=.00001,
pRange=c(1e-10,1-1e-10))
exactpoissonCI(x, tsmethod="minlike",conf.level=.95,tol=.00001,
pRange=c(1e-10,1-1e-10))
x |
number of successes or counts, vectors not allowed |
n |
number at risk, vectors not allowed |
p |
binomial parameter for null hypothesis, may be vector |
relErr |
used in calculation to avoid ties, slightly bigger than 1 |
tsmethod |
two-sided method, one of "minlike", "blaker" ("central" only allowed for |
T |
number at risk or person-years at risk, vectors not allowed |
r |
rate parameter for null hypothesis, null is E(x*T)=r, vectors only allowed for |
conf.level |
number between 0 and 1 for level of confidence interval |
pRange |
range to search for confidence intervals, between 0 and 1 (even for poisson where it is transformed to a 0 to Inf-like range) |
tol |
tolerance for precision of confidence interval, very small number |
midp |
logical, use mid-p for p-values? |
The function exactbinomPvals
tests point null hypotheses for a single binomial observation.
The function exactpoissonPvals
tests point null hypotheses for a single Poisson observation. To get p-values for the two-sample
Poisson test save results from exactpoissonPlot
.
The functions exactbinomCI
and exactpoissonCI
calculate the "minlike" and "blaker" confidence intervals.
Returns either a confidence interval with attributes giving precision, or a pvalue (exactpoissonPval), or a list with pvals and parameters (r,T for poisson and p for binomial).
poisson.exact
and binom.exact
exactbinomPvals(3,10,c(.3,.4,.5),tsmethod="minlike")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.