P-value of maximum test and adjusted p-values for M contrasts of I groups in a one-way layout. Tests are performed for contrasts of proportions, which can be interpreted as differences of (weighted averages of) proportions.
binomRDtest(x, ...)# S3 method for default
binomRDtest(x, n, names=NULL,
type="Dunnett", cmat=NULL, method="Wald",
alternative="two.sided", dist="MVN", ...)
# S3 method for formula
binomRDtest(formula, data,
type="Dunnett", cmat=NULL, method="Wald",
alternative="two.sided", dist="MVN", ...)
# S3 method for table
binomRDtest(x, type="Dunnett",
cmat=NULL, method="Wald", alternative="two.sided",
dist="MVN", ...)
# S3 method for matrix
binomRDtest(x, type="Dunnett",
cmat=NULL, method="Wald", alternative="two.sided",
dist="MVN", ...)
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
a numerioc vector, giving the number of trials (i.e. the sample size) in each of the I groups
an optional character vector, giving the names of the groups in x, n; if not specified, possibly availbale names of x are taken as group names
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
a data.frame, containing the variables specified in formula
a character string specifying the contrast type
an optional user defined contrast matrix of dimension MxI
a single charcter string, specifying the method for adjustment, with options: "Wald" (Maximum likelihood estimators), "ADD1" (add1-adjustment on the raw proportion estimates) "ADD2" (add2-adjustment on proportion estimates following Agresti Caffo (2000))
a character string specifying the direction of the alternative hypothesis
a character string, where "MVN" invokes the computation of p-values using the multivariate normal distribution, and "N" invokes use p-value computation using the univariate normal distribution
arguments to be passed to binomest, currently only success labelling the event which should be considered as success
An object of class "binomRDtest", a list containing:
a numeric vector of teststatistics of length M
a single numeric p-value, the p-value of the maximum test (minimum p-value)
a vector of length M, the adjusted p-values of the single contrasts
character string indicating whether the multivariate normal or normal distribution was used for computation of p-values
a single character vector, as the input
the observed number of successes in the treatment groups
the number of trials in the treatment groups
the estimated proportions in the treatment groups
a character string labelling the event considered as success
as input, a character string
used contrast matrix
For usage, see the examples.
Statistical procedures and characterization of coverage probabilities are described in: Sill, M. (2007): Approximate simultaneous confidence intervals for multiple comparisons of binomial proportions. Master thesis, Institute of Biostatistics, Leibniz University Hannover.
# NOT RUN {
ntrials <- c(40,20,20,20)
xsuccesses <- c(1,2,2,4)
names(xsuccesses) <- LETTERS[1:4]
binomRDtest(x=xsuccesses, n=ntrials, method="ADD1",
type="Dunnett")
binomRDtest(x=xsuccesses, n=ntrials, method="ADD1",
type="Williams", alternative="greater")
binomRDtest(x=xsuccesses, n=ntrials, method="ADD2",
type="Williams", alternative="greater")
# }
Run the code above in your browser using DataLab