Learn R Programming

SimComp (version 2.2)

SimCiDiff: Simultaneous Confidence Intervals for Differences of Means of Multiple Endpoints

Description

Simultaneous confidence intervals for general contrasts (linear functions) of normal means (e.g., "Dunnett", "Tukey", "Williams" ect.) when there is more than one primary response variable (endpoint). The procedure of Hasler and Hothorn (2011) is applied for differences of means of normally distributed data. The covariance matrices (containing the covariances between the endpoints) may be assumed to be equal or possibly unequal for the different groups (Hasler, 2014). For the case of only a single endpoint and unequal covariance matrices (variances), the procedure coincides with the PI procedure of Hasler and Hothorn (2008).

Usage

SimCiDiff(data, grp, resp = NULL, type = "Dunnett", base = 1, ContrastMat = NULL,
          alternative = "two.sided", covar.equal = FALSE, conf.level = 0.95)

Arguments

data

a data frame containing a grouping variable and the endpoints as columns

grp

a character string with the name of the grouping variable

resp

a vector of character strings with the names of the endpoints; if resp=NULL (default), all column names of the data frame without the grouping variable are chosen automatically

type

a character string, defining the type of contrast, with the following options:

  • "Dunnett": many-to-one comparisons

  • "Tukey": all-pair comparisons

  • "Sequen": comparisons of consecutive groups

  • "AVE": comparison of each group with average of all others

  • "GrandMean": comparison of each group with grand mean of all groups

  • "Changepoint": differences of averages of groups of higher order to averages of groups of lower order

  • "Marcus": Marcus contrasts

  • "McDermott": McDermott contrasts

  • "Williams": Williams trend tests

  • "UmbrellaWilliams": Umbrella-protected Williams trend tests

note that type is ignored if ContrastMat is specified by the user (see below)

base

a single integer specifying the control group for Dunnett contrasts, ignored otherwise

ContrastMat

a contrast matrix, where columns correspond to groups and rows correspond to contrasts

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less"

covar.equal

a logical variable indicating whether to treat the covariance matrices (containing the covariances between the endpoints) for the different groups as being equal; if TRUE then the pooled covariance matrix is used, otherwise the Satterthwaite approximation to the degrees of freedom is used according to Hasler and Hothorn (2008)

conf.level

a numeric value defining the simultaneous confidence level

Value

An object of class SimCi containing:

estimate

a matrix of estimated differences

lower.raw

a matrix of raw (unadjusted) lower limits

upper.raw

a matrix of raw (unadjusted) upper limits

lower

a matrix of lower limits adjusted for multiplicity

upper

a matrix of upper limits adjusted for multiplicity

CorrMatDat

either the estimated common correlation matrix of the data (covar.equal=TRUE) or the list of the different (one for each treatment) estimated correlation matrices of the data (covar.equal=FALSE)

CorrMatComp

the estimated correlation matrix to be used for the multivariate t-distribution

degr.fr

either a single degree of freedom (covar.equal=TRUE) or a vector of degrees of freedom (covar.equal=FALSE) related to the comparisons

Details

The interest is in simultaneous confidence intervals for several linear combinations (contrasts) of treatment means in a one-way ANOVA model, and simultaneously for multiple endpoints. For example, corresponding intervals for the all-pair comparison of Tukey (1953) and the many-to-one comparison of Dunnett (1955) are implemented, but allowing for multiple endpoints. Also, the user is free to create other interesting problem-specific contrasts. An approximate multivariate t-distribution is used to calculate lower and upper limits (see Hasler and Hothorn, 2011). Simultaneous tests based on these intervals control the familywise error rate in an admissible range and in the strong sense. The covariance matrices of the treatment groups (containing the covariances between the endpoints) can be assumed to be equal (covar.equal=TRUE) or unequal (covar.equal=FALSE). If being equal, the pooled covariance matrix is used, otherwise approximations to the degrees of freedom (Satterthwaite, 1946) are used (see Hasler, 2014). Unequal covariance matrices occure if variances or correlations of some endpoints differ depending on the treatment groups.

References

Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17--28.

Hasler, M. and Hothorn, L.A. (2011): A Dunnett-type procedure for multiple endpoints. The International Journal of Biostatistics 7, Article 3.

Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793--800.

Satterthwaite, F.E. (1946): An approximate distribution of estimates of variance components. Biometrics 2, 110--114.

See Also

SimCiRat, SimTestDiff, SimTestRat

Examples

Run this code
# NOT RUN {
# Example 1:
# Simultaneous confidence intervals related to a comparison of the groups
# B and H against the standard S, on endpoint Thromb.count, assuming unequal
# variances for the groups. This is an extension of the well-known Dunnett-
# intervals to the case of heteroscedasticity.

data(coagulation)

interv1 <- SimCiDiff(data=coagulation, grp="Group", resp="Thromb.count",
  type="Dunnett", base=3, alternative="greater", covar.equal=FALSE)
interv1

# Example 2:
# Simultaneous confidence intervals related to a comparisons of the groups
# B and H against the standard S, simultaneously on all endpoints, assuming
# unequal covariance matrices for the groups. This is an extension of the well-
# known Dunnett-intervals to the case of heteroscedasticity and multiple
# endpoints.

data(coagulation)

interv2 <- SimCiDiff(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"),
  type="Dunnett", base=3, alternative="greater", covar.equal=FALSE)
summary(interv2)
# }

Run the code above in your browser using DataLab