Covrg {CooccurrenceAffinity} | R Documentation |
This function calculates the coverage probability at the true value alpha of the four types of Cpnfidence Intervals (CI.CP, CI.Blaker, CI.midQ, CI.midP) computed in AlphInts().
Covrg(marg, alph, scal = log(2 * marg[3]^2), lev = 0.95)
marg |
a 3-entry integer vector (mA,mB,N) consisting of the first row and column totals and the table total for a 2x2 contingency table |
alph |
True log-odds-ratio value alpha at which coverage probabilities (under Extended Hypergeometric with parameters mA,mB,N, exp(alp)) are to be calculated |
scal |
an integer parameter (default 2*N^2, capped at 10 within the function) that should be 2 or greater |
lev |
a confidence level, generally somewhere from 0.8 to 0.95 (default 0.95) |
See AlphInts() documentation for details of computation of the four confidence intervals CI.CP, CI.Blaker, CI.midQ, CI.midP. The confidence intervals are calculated for each x in the allowed range from max(mA+mB-N,0) to min(mA,mB), and the probability that X=x times the indicator of alph falling in each of them is summed.
A vector covPrb containing the coverage propbabilities for the four Confidence Intervals
Eric Slud
to be added
Covrg(c(50,70,150), 1.2, lev=0.95)
Covrg(c(50,70,150), 0, lev=0.95)
Covrg(c(50,80,120), 1.5, lev=0.9)