Description Usage Arguments Details Value Author(s) References See Also Examples

Approximate simultaneous confidence intervals for (weighted geometric means of) odds ratios are constructed. Estimates are derived from fitting a glm on the logit-link, approximate intervals are constructed on the logit-link, and transformed to original scale.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
binomORci(x, ...)
## Default S3 method:
binomORci(x, n, names = NULL,
type = "Dunnett", method="GLM", cmat = NULL,
alternative = "two.sided", conf.level = 0.95,
dist="MVN", ...)
## S3 method for class 'formula'
binomORci(formula, data,
type = "Dunnett", method="GLM", cmat = NULL,
alternative = "two.sided", conf.level = 0.95,
dist="MVN", ...)
## S3 method for class 'table'
binomORci(x,
type = "Dunnett",method="GLM", cmat = NULL,
alternative = "two.sided", conf.level = 0.95,
dist="MVN", ...)
## S3 method for class 'matrix'
binomORci(x,
type = "Dunnett", method="GLM", cmat = NULL,
alternative = "two.sided", conf.level = 0.95,
dist="MVN", ...)
``` |

`x` |
a numeric vector, giving the number of successes in I independent samples,
or an object of class |

`n` |
numeric vector, giving the number of trials (i.e. the sample size) in each of the I groups
(only required if |

`names` |
an optional character string, giving the names of the groups/ sample in |

`formula` |
a two-sided formula of the style 'response ~ treatment', where 'response' should be a categorical variable with two levels, while treatment should be a factor specifying the treatment levels |

`data` |
a data.frame, containing the variables specified in formula |

`type` |
a character string, giving the name of a contrast method,
as defined in |

`method` |
a single character string, specifying the method for confidence interval computation; Options are |

`cmat` |
a optional contrast matrix |

`alternative` |
a single character string, one of "two.sided", "less", "greater" |

`conf.level` |
a single numeric value, simultaneous confidence level |

`dist` |
a character string, |

`...` |
arguments to be passed to binomest, currently only |

This function calls glm and fits a one-way-model with family binomial on the logit-link. Then, the point estimates and variances estimates from the fit are taken to construct simultaneous confidence intervals for differences (of weighted arithmetic means) of log-odds. Applying the exponential function to these intervals on the logit scale yields intervals for ratios (of weighted geometric) of odds. For simple groupwise comparisons, one yields intervals for oddsratios. For the case of Dunnett-type contrasts, the calculated simultaneous confidence intervals are those described in Holford et al. (1989).

Specifying `method="GLM"` takes maximum likelihood estimates for the log-odds and their standard errors evaluated at the estimate.

Specifying `method="Woolf"` takes adds 0.5 to each cell count and computes point estimates and standard errors for these continuity corrected values.
For the two-sample comparison this method is refered to as "adjusted Woolf" (Lawson, 2005). In this implementation, the lower bounds yielded by this method
are additionally expanded to 0, if all values in the denominator are x=n or all values in the numerator are x=0, and the upper bounds are expanded to Inf,
if all values in the denominator are x=0 or all values in the numerator are x=n.

Note, that for the case of general contrasts, the methods are not described explicitly so far.

A object of class "binomORci", a list containing:

`conf.int` |
a matrix with 2 columns: lower and upper confidence bounds, and M rows |

`alternative ` |
character string, as input |

`conf.level` |
single numeric value, as input |

`estimate` |
a matrix with 1 column: containing the estimates of the contrasts |

`x` |
the observed number of successes |

`n` |
the number of trials |

`p` |
the estimated proportions |

`success` |
a character string labelling the event considered as success |

`names` |
the group names |

`method` |
a character string, specifying the method of interval construction |

`cmat` |
the contrast matrix used |

Frank Schaarschmidt, Daniel Gerhard

Holford, TR, Walter, SD and Dunnett, CW (1989). Simultaneous interval estimates of the odds ratio in studies with two or more comparisons. Journal of Clinical Epidemiology 42, 427-434.

Intervals for the risk difference binomRDci, summary for odds ratio confidence intervals summary.binomORci plot for confidence intervals plot.sci

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ```
data(liarozole)
table(liarozole)
# Comparison to the control group "Placebo",
# which is the fourth group in alpha-numeric
# order:
ORlia<-binomORci(Improved ~ Treatment,
data=liarozole, success="y", type="Dunnett", base=4)
ORlia
summary(ORlia)
plot(ORlia)
# if data are available as table:
tab<-table(liarozole)
tab
ORlia2<-binomORci(tab, success="y", type="Dunnett", base=4)
ORlia2
plot(ORlia2, lines=1, lineslty=3)
############################
# Performance for extreme cases
# method="GLM" (the default)
test1<-binomORci(x=c(0,1,5,20), n=c(20,20,20,20), names=c("A","B","C","D"))
test1
plot(test1)
# adjusted Woolf interval
test2<-binomORci(x=c(0,1,5,20), n=c(20,20,20,20), names=c("A","B","C","D"), method="Woolf")
test2
plot(test2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.