binomORci {MCPAN} | R Documentation |
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 log-link, and transformed to origninal scale.
binomORci(x, ...) ## Default S3 method: binomORci(x, n, names = NULL, type = "Dunnett", cmat = NULL, alternative = "two.sided", conf.level = 0.95, ...) ## S3 method for class 'formula': binomORci(formula, data, type = "Dunnett", cmat = NULL, alternative = "two.sided", conf.level = 0.95, ...) ## S3 method for class 'table': binomORci(x, type = "Dunnett", cmat = NULL, alternative = "two.sided", conf.level = 0.95, ...) ## S3 method for class 'matrix': binomORci(x, type = "Dunnett", cmat = NULL, alternative = "two.sided", conf.level = 0.95, ...)
x |
a numeric vector, giving the number of successes in I independent samples,
or an object of class "table" , representing the 2xk-table,
or an object of class "matrix" , representing the 2xk-table |
n |
numeric vector, giving the number of trials (i.e. the sample size) in each of the I groups
(only required if x is a numeric vector, ignored otherwise) |
names |
an optional character string, giving the names of the groups/ sample in x , n ;
if not specified the possible names of x are taken as group names (ignored if x is a table or matrix) |
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 contrMat(multcomp) ; ignored if cmat is sepcified |
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 |
... |
arguments to be passed to binomest , currently only success labelling the event which should be considered as success |
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 |
Daniel Gerhard, Frank Schaarschmidt
. . .
Intervals for the risk difference binomRDci
,
summary for odds ratio confidence intervals summary.binomORci
plot for confidence intervals plot.sci
data(liarozole) table(liarozole) ORlia<-binomORci(Improved ~ Treatment, data=liarozole, success="y") ORlia summary(ORlia) plot(ORlia) # if data are available as table: tab<-table(liarozole) ORlia2<-binomORci(tab, success="y") ORlia2