multinomORci {MCPAN} | R Documentation |
Simultaneous confidence intervals for odds ratios comparing multiple odds and multiple treatments in a contingency table
Description
Testversion. Two methods are provided to compute simultaneous confidence intervals for the comparison of several types of odds between several multinomial samples. Asymptotic Wald-type intervals (incl. replacing zero by some small number) as well as a method that computes simultaneous percentile intervals based on samples from the joint Dirichlet-posterior distribution with vague prior. A separate multinomial distribution is assumed for each row of the contingency table.
Usage
multinomORci(Ymat, cmcat=NULL, cmgroup=NULL, cimethod = "DP",
alternative = "two.sided", conf.level = 0.95,
bycomp = FALSE, bychr = " btw ", ...)
Arguments
Ymat |
a |
cmcat |
a |
cmgroup |
a |
cimethod |
|
alternative |
single |
conf.level |
single number: the simultaneous confidcence level |
bycomp |
logical, if |
bychr |
character string separating the name of the odds from the name of the between group comparison in the output |
... |
further arguments to be passed to the internal functions: if |
Details
Testversion.
Value
A list with items
SCI |
a |
details |
a list with computational details depending on the |
Author(s)
Frank Schaarschmidt
See Also
as.data.frame.multinomORci
, print.multinomORci
Examples
# Randomized clinical trial 2 treatment groups (injection of saline or sterile water)
# to cure chronic pain after whiplash injuries. Response are 3 (ordered) categories,
# 'no change', 'improved', 'much improved'. Source: Hand, Daly, Lunn, McConway,
# Ostrowski (1994): A handbook of small data sets. Chapman & Hall, Example 124, page 993
dwi <- data.frame("no.change"=c(1,14), "improved"=c(9,3), "much.improved"=c(10,3))
rownames(dwi) <- c("sterile3", "saline3")
dwi
DP1dwi <- multinomORci(Ymat=dwi, cmcat="Dunnett", cmgroup="Tukey", cimethod="DP", BSIM=5000)
DP1dwi
# at logit-scale (i.e., not backtransformation)
print(DP1dwi , exp=FALSE)
## Not run:
# Compute asymptotic Wald-type intervals
Waldwbc <- multinomORci(Ymat=dwi, cmcat="Dunnett", cmgroup="Tukey", cimethod="Wald")
Waldwbc
print(Waldwbc, exp=FALSE)
## End(Not run)