SimTestDiff {SimComp}R Documentation

Simultaneous Tests for Differences of Means of Multiple Endpoints

Description

Simultaneous tests 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 (2009) 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.

Usage

SimTestDiff(data, grp, resp = NULL, type = "Dunnett", base = 1, ContrastMat = NULL,
            alternative = "two.sided", Margin = NULL, covar.equal = FALSE)

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"
Margin a single numeric value, or a numeric vector corresponding to endpoints, or a matrix where columns correspond to endpoints and rows correspond to contrasts, default is 0
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)

Details

The interest is in simultaneous tests for several linear combinations (contrasts) of treatment means in a one-way ANOVA model, and simultaneously for multiple endpoints. For example, 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 (adjusted) p-values (see Hasler, 2009). This approach controls the familywise error rate 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 the Satterthwaite approximation to the degrees of freedom is used according to Hasler and Hothorn (2008). Unequal covariance matrices occure if either variances or correlations of some endpoints differ depending on the treatment groups.

Value

An object of class SimTest containing:

estimate a matrix of estimated differences
statistic a matrix of the calculated test statistics
p.val.raw a matrix of raw p-values
p.val.adj a matrix of p-values 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 matrix of degrees of freedom (covar.equal=FALSE)

Note

All measurement objects of each treatment group must have values for each endpoint. If there are missing values then the procedure stops. If covar.equal=TRUE, then the number of endpoints must not be greater than the total sample size minus the number of treatment groups. If covar.equal=FALSE, the number of endpoints must not be greater than the minimal sample size minus 1. Otherwise the procedure stops.

All hypotheses are tested with the same test direction for all comparisons and endpoints (alternative="..."). In case of doubts, use "two.sided".

If Margin is a single numeric value or a numeric vector, then the same value(s) are used for the remaining comparisons or endpoints. If Margin is not specified, the default is 0.

Author(s)

Mario Hasler

References

Hasler, M. (2009): Extensions of Multiple Contrast Tests. PhD Thesis, Gottfried-Wilhelm-Leibniz-Universitaet Hannover.

Hasler, M. and Hothorn, L.A. (submitted): A Dunnett-type Procedure for Multiple Endpoints

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

See Also

SimTestRat, SimCiDiff, SimCiRat,

Examples

data(iris)

comp <- SimTestDiff(data=iris, grp="Species", alternative="greater", Margin=1)
summary(comp)

[Package SimComp version 1.3 Index]