OddsRatio(x, alpha = 0.05)
plotOddsRatio(x,
ylab = "prob(col1 | row1)", xlab = "prob(col1 | row2)",
alpha = c(0.05, 0.5),
legend.x=1.05,
oma=c(0,0,0,5), ...)OddsRatio requires a single number in the range [0,1].
plotOddsRatio accepts more than one number on the range
[0,1] and draws confidence lines at each value.par()$oma, needed to make room for legend.plotOddsRatio draws a plot and invisibly returns the same
list as OddsRatio for the first value of alpha.
OddsRatio returns the list:ln(psihat)ln(psihat)
using normal approximationpsihat calculated
ase p(ci.ln.psihat)seq(0,1,.05), set of p1 values for plotting.p1/(1-p1)psihat with
the specified odds1, calculated as odds1*psihat.odds2odds2 / (odds2+1)ci.odds2 / (ci.odds2+1)data(glasses)
## draw the iso-odds ratio plot with 50\% CI and 95\% CI,
## invisibly return the 95\% CI
plotOddsRatio(glasses)Run the code above in your browser using DataLab