Title: | Simultaneous Comparisons for Multiple Endpoints |
---|---|
Description: | Simultaneous tests and confidence intervals are provided for one-way experimental designs with one or many normally distributed, primary response variables (endpoints). Differences (Hasler and Hothorn, 2011 <doi:10.2202/1557-4679.1258>) or ratios (Hasler and Hothorn, 2012 <doi:10.1080/19466315.2011.633868>) of means can be considered. Various contrasts can be chosen, unbalanced sample sizes are allowed as well as heterogeneous variances (Hasler and Hothorn, 2008 <doi:10.1002/bimj.200710466>) or covariance matrices (Hasler, 2014 <doi:10.1515/ijb-2012-0015>). |
Authors: | Mario Hasler, Christof Kluss |
Maintainer: | Mario Hasler <[email protected]> |
License: | GPL |
Version: | 3.3 |
Built: | 2024-11-03 06:46:32 UTC |
Source: | CRAN |
Simultaneous tests and confidence intervals are provided for one-way experimental designs with one or many normally distributed, primary response variables (endpoints). Differences (Hasler and Hothorn, 2011 <doi:10.2202/1557-4679.1258>) or ratios (Hasler and Hothorn, 2012 <doi:10.1080/19466315.2011.633868>) of means can be considered. Various contrasts can be chosen, unbalanced sample sizes are allowed as well as heterogeneous variances (Hasler and Hothorn, 2008 <doi:10.1002/bimj.200710466>) or covariance matrices (Hasler, 2014 <doi:10.1515/ijb-2012-0015>).
The DESCRIPTION file:
Package: | SimComp |
Type: | Package |
Title: | Simultaneous Comparisons for Multiple Endpoints |
Version: | 3.3 |
Date: | 2019-08-26 |
Author: | Mario Hasler, Christof Kluss |
Maintainer: | Mario Hasler <[email protected]> |
Imports: | mvtnorm, multcomp, mratios, graphics, stats |
Description: | Simultaneous tests and confidence intervals are provided for one-way experimental designs with one or many normally distributed, primary response variables (endpoints). Differences (Hasler and Hothorn, 2011 <doi:10.2202/1557-4679.1258>) or ratios (Hasler and Hothorn, 2012 <doi:10.1080/19466315.2011.633868>) of means can be considered. Various contrasts can be chosen, unbalanced sample sizes are allowed as well as heterogeneous variances (Hasler and Hothorn, 2008 <doi:10.1002/bimj.200710466>) or covariance matrices (Hasler, 2014 <doi:10.1515/ijb-2012-0015>). |
License: | GPL |
LazyLoad: | yes |
NeedsCompilation: | no |
Packaged: | 2019-08-26 13:46:48 UTC; Administrator |
Repository: | CRAN |
Date/Publication: | 2019-08-26 14:50:10 UTC |
Index of help topics:
DfSattDiff Degrees of Freedom Accoding to Satterthwaite (1946) for Differences of Means DfSattRat Degrees of Freedom Accoding to Satterthwaite (1946) for Ratios of Means SimCiDiff Simultaneous Confidence Intervals for General Contrasts (Differences) of Means of Multiple Endpoints SimCiRat Simultaneous Confidence Intervals for General Contrasts (Ratios) of Means of Multiple Endpoints SimComp-package Simultaneous Comparisons for Multiple Endpoints SimTestDiff Simultaneous Tests for General Contrasts (Differences) of Means of Multiple Endpoints SimTestRat Simultaneous Tests for General Contrasts (Ratios) of Means of Multiple Endpoints coagulation Data from a clinical study of three sets of extracorporeal circulation in heart-lung machines ermvnorm Multivariate Normal Random Numbers with Exact Parameters plot.SimCi Plot function for SimCi-objects print.SimCi Print function for SimCi-objects print.SimTest Print function for SimTest-objects rcm Random Correlation Matrices summary.SimCi Summary function for SimCi-objects summary.SimTest Summary function for SimTest-objects
Mario Hasler, Christof Kluss
Maintainer: Mario Hasler <[email protected]>
Thanks to: Frank Schaarschmidt, Gemechis Djira Dilba, Kornelius Rohmeyer
Hasler, M. and Hothorn, L.A. (2018): Multi-arm trials with multiple primary endpoints and missing values. Statistics in Medicine 37, 710–721, <doi:10.1002/sim.7542>.
Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17–28, <doi:10.1515/ijb-2012-0015>.
Hasler, M. and Hothorn, L.A. (2012): A multivariate Williams-type trend procedure. Statistics in Biopharmaceutical Research 4, 57–65, <doi:10.1080/19466315.2011.633868>.
Hasler, M. and Hothorn, L.A. (2011): A Dunnett-type procedure for multiple endpoints. The International Journal of Biostatistics 7, Article 3, <doi:10.2202/1557-4679.1258>.
Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793–800, <doi:10.1002/bimj.200710466>.
Dilba, G. et al. (2006): Simultaneous confidence sets and confidence intervals for multiple ratios. Journal of Statistical Planning and Inference 136, 2640–2658, <doi:10.1016/j.jspi.2004.11.009>.
# Example 1: # A comparison of the groups B and H against the standard S, for endpoint # Thromb.count, assuming unequal variances for the groups. This is an # extension of the well-known Dunnett-test to the case of heteroscedasticity. data(coagulation) comp1 <- SimTestDiff(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) comp1 # Example 2: # A comparison of the groups B and H against the standard S, simultaneously # for all endpoints, assuming unequal covariance matrices for the groups. This is # an extension of the well-known Dunnett-test to the case of heteroscedasticity # and multiple endpoints. data(coagulation) comp2 <- SimTestDiff(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(comp2)
# Example 1: # A comparison of the groups B and H against the standard S, for endpoint # Thromb.count, assuming unequal variances for the groups. This is an # extension of the well-known Dunnett-test to the case of heteroscedasticity. data(coagulation) comp1 <- SimTestDiff(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) comp1 # Example 2: # A comparison of the groups B and H against the standard S, simultaneously # for all endpoints, assuming unequal covariance matrices for the groups. This is # an extension of the well-known Dunnett-test to the case of heteroscedasticity # and multiple endpoints. data(coagulation) comp2 <- SimTestDiff(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(comp2)
Three sets of extracorporeal circulation in heart-lung machines: treatments H and B, and standard S. Twelve (S and H each) and eleven (B) male adult patients have been considered. The analysis is based on a set of laboratory parameters restricted to the blood coagulation system, characterized by three primary endpoints (each as quotient from post- and pre-surgery values). Higher values indicate a better treatment effect. For more details, see Kropf et al. (2000).
data(coagulation)
data(coagulation)
A data frame with 35 observations on the following 5 variables.
Patient
a numeric vector, the patients' number
Thromb.count
a numeric vector
ADP
a numeric vector
TRAP
a numeric vector
Group
a factor with levels B
, H
, S
specifying the treatments, where S
is the standard
Kropf, S. et al. (2000): Multiple comparisons of treatments with stable multivariate tests in a two-stage adaptive design, including a test for non-inferiority. Biometrical Journal 42, 951-965.
Hasler, M. and Hothorn, L.A. (2011): A Dunnett-type procedure for multiple endpoints. The International Journal of Biostatistics 7, Article 3, <doi:10.2202/1557-4679.1258>.
data(coagulation) str(coagulation)
data(coagulation) str(coagulation)
Degrees of freedom accoding to Satterthwaite (1946) for (multivariate) t-distributions related to multiple contrast tests or corresponding simultaneous confidence intervals for differences of means. For contrasts representing a two-sample t-test, the degree of freedom coincides with the one of Welch (1938).
DfSattDiff(n, sd, type = "Dunnett", base = 1, ContrastMat = NULL)
DfSattDiff(n, sd, type = "Dunnett", base = 1, ContrastMat = NULL)
n |
a vector of numbers of observations |
sd |
a vector of standard deviations |
type |
a character string, defining the type of contrast, with the following options:
note that |
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 |
The calculation of critical values or (adjusted) p-values related to multiple contrast tests or corresponding simultaneous confidence intervals is based on a multivariate t-distribution. For homoscedastic data, the respective degree of freedom only depends on the total sample size and the number of groups. A simple and well-known special case is the usual t-test. If the data are heteroscedastic, however, the degree of freedom of a t-test must be decreased according to Welch (1938) to come to an approximate solution. Degrees of freedom according to Satterthwaite (1946) refer to any linear combinations (contrasts) of normal means. They are applied, for example, when doing multiple contrast tests for heteroscedastic data according to Hasler and Hothorn (2008) <doi:10.1002/bimj.200710466> or Hasler (2014) <doi:10.1515/ijb-2012-0015>. Like Welch (1938), Satterthwaite (1946) approximated the degree of freedom by matching first and second moments. The resulting degree of freedom then depends on the contrast and on the sample sizes and sample variances per group.
A vector of degrees of freedom.
The commands SimTestDiff()
and SimCiDiff()
use these degrees of freedom
automatically if covar.equal=FALSE
(default). You don't need to apply
DfSattDiff()
additionally.
Mario Hasler
Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17–28, <doi:10.1515/ijb-2012-0015>.
Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793–800, <doi:10.1002/bimj.200710466>.
Satterthwaite, F.E. (1946): An approximate distribution of estimates of variance components. Biometrics 2, 110–114.
Welch, B.L. (1938): The significance of the difference between two means when the population variances are unequal. Biometrika 29, 350–362.
# Example 1: # Degrees of freedom for a comparison of group two and three against group one, assuming # unequal standard deviations for the groups. This is an extension for the well-known # Dunnett-test to the case of heteroscedasticity. # Either by specifying the type of contrast: DfSattDiff(n=c(10,6,6), sd=c(1,3,6), type="Dunnett", base=1) # Or by specifying the contrast matrix: DfSattDiff(n=c(10,6,6), sd=c(1,3,6), ContrastMat=rbind(c(-1,1,0),c(-1,0,1))) # Example 2: # Degrees of freedom for an all-pair comparison of the groups B, H and S on endpoint ADP, # assuming unequal standard deviations for the groups. This is an extension for the well- # known Tukey-test to the case of heteroscedasticity. The same degrees of freedom are # used automatically by command \code{SimTestDiff()}. data(coagulation) DfSattDiff(n=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=length), sd=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=sd), type="Tukey")
# Example 1: # Degrees of freedom for a comparison of group two and three against group one, assuming # unequal standard deviations for the groups. This is an extension for the well-known # Dunnett-test to the case of heteroscedasticity. # Either by specifying the type of contrast: DfSattDiff(n=c(10,6,6), sd=c(1,3,6), type="Dunnett", base=1) # Or by specifying the contrast matrix: DfSattDiff(n=c(10,6,6), sd=c(1,3,6), ContrastMat=rbind(c(-1,1,0),c(-1,0,1))) # Example 2: # Degrees of freedom for an all-pair comparison of the groups B, H and S on endpoint ADP, # assuming unequal standard deviations for the groups. This is an extension for the well- # known Tukey-test to the case of heteroscedasticity. The same degrees of freedom are # used automatically by command \code{SimTestDiff()}. data(coagulation) DfSattDiff(n=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=length), sd=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=sd), type="Tukey")
Degrees of freedom accoding to Satterthwaite (1946) for (multivariate) t-distributions related to multiple contrast tests or corresponding simultaneous confidence intervals for ratios of means. For contrasts representing a two-sample t-test, the degree of freedom coincides with the one of Welch (1938).
DfSattRat(n, sd, type = "Dunnett", base = 1, Num.Contrast = NULL, Den.Contrast = NULL, Margin = 1)
DfSattRat(n, sd, type = "Dunnett", base = 1, Num.Contrast = NULL, Den.Contrast = NULL, Margin = 1)
n |
a vector of numbers of observations |
sd |
a vector of standard deviations |
type |
a character string, defining the type of contrast, with the following options:
note that |
base |
a single integer specifying the control group for Dunnett contrasts, ignored otherwise |
Num.Contrast |
a numerator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
Den.Contrast |
a denominator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
Margin |
a single numeric value, or a numeric vector with length equal to the number of contrasts, default is 1 |
The calculation of critical values or (adjusted) p-values related to multiple
contrast tests or corresponding simultaneous confidence intervals is based on a
multivariate t-distribution. For homoscedastic data, the respective degree of
freedom only depends on the total sample size and the number of groups. A simple and
well-known special case is the usual t-test. If the data are heteroscedastic,
however, the degree of freedom of a t-test must be decreased according to
Welch (1938) to come to an approximate solution. Degrees of freedom according to
Satterthwaite (1946) refer to any linear combinations (contrasts) of normal means.
They are applied, for example, when doing multiple contrast tests for heteroscedastic
data according to Hasler and Hothorn (2008) <doi:10.1002/bimj.200710466> or
Hasler (2014) <doi:10.1515/ijb-2012-0015>. Like Welch (1938), Satterthwaite (1946)
approximated the degree of freedom by matching first and second moments. The
resulting degree of freedom then depends on the numerator contrast, the denominator
contrast, the (relative) margin to test against, and on the sample sizes and sample
variances per group. If Margin=1
or Margin=NULL
(default),
the result coincides with the result of DfSattDiff()
.
A vector of degrees of freedom.
The commands SimTestRat()
and SimCiRat()
use these degrees of freedom
automatically if covar.equal=FALSE
(default). You don't need to apply
DfSattRat()
additionally.
Mario Hasler
Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17–28, <doi:10.1515/ijb-2012-0015>.
Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793–800, <doi:10.1002/bimj.200710466>.
Satterthwaite, F.E. (1946): An approximate distribution of estimates of variance components. Biometrics 2, 110–114.
Welch, B.L. (1938): The significance of the difference between two means when the population variances are unequal. Biometrika 29, 350–362.
# Example 1: # Degrees of freedom for a non-inferiority test of group two and three against group one, # assuming unequal standard deviations for the groups. This is an extension for the well- # known Dunnett-test to the case of heteroscedasticity and in terms of ratios of means # instead of differences. # Either by specifying the type of contrast: DfSattRat(n=c(10,6,6), sd=c(1,3,6), type="Dunnett", base=1, Margin=0.8) # Or by specifying the contrast matrices: DfSattRat(n=c(10,6,6), sd=c(1,3,6), Num.Contrast=rbind(c(0,1,0),c(0,0,1)), Den.Contrast=rbind(c(1,0,0),c(1,0,0)), Margin=0.8) # Example 2: # Degrees of freedom for an all-pair comparison of the groups B, H and S on endpoint ADP, # assuming unequal standard deviations for the groups. This is an extension for the well- # known Tukey-test to the case of heteroscedasticity and in terms of ratios of means # instead of differences. The same degrees of freedom are used automatically by command # \code{SimTestRat()}. data(coagulation) DfSattRat(n=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=length), sd=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=sd), type="Tukey")
# Example 1: # Degrees of freedom for a non-inferiority test of group two and three against group one, # assuming unequal standard deviations for the groups. This is an extension for the well- # known Dunnett-test to the case of heteroscedasticity and in terms of ratios of means # instead of differences. # Either by specifying the type of contrast: DfSattRat(n=c(10,6,6), sd=c(1,3,6), type="Dunnett", base=1, Margin=0.8) # Or by specifying the contrast matrices: DfSattRat(n=c(10,6,6), sd=c(1,3,6), Num.Contrast=rbind(c(0,1,0),c(0,0,1)), Den.Contrast=rbind(c(1,0,0),c(1,0,0)), Margin=0.8) # Example 2: # Degrees of freedom for an all-pair comparison of the groups B, H and S on endpoint ADP, # assuming unequal standard deviations for the groups. This is an extension for the well- # known Tukey-test to the case of heteroscedasticity and in terms of ratios of means # instead of differences. The same degrees of freedom are used automatically by command # \code{SimTestRat()}. data(coagulation) DfSattRat(n=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=length), sd=tapply(X=coagulation$ADP, INDEX=coagulation$Group, FUN=sd), type="Tukey")
Random numbers of the multivariate normal distribution with EXACT mean vector, EXACT
variance vector and approximate correlation matrix. This function is based on the
function rmvnorm
of the package mvtnorm.
ermvnorm(n, mean, sd, corr = diag(rep(1, length(mean))), mnt = 10000)
ermvnorm(n, mean, sd, corr = diag(rep(1, length(mean))), mnt = 10000)
n |
a number of observations |
mean |
a mean vector |
sd |
a vector of standard deviations |
corr |
a correlation matrix |
mnt |
a maximum number of tries for the computation |
Unfortunately, it's very common to present only summary statistics in the literature
when evaluating real data. This makes it hard to retrace or to verify the related
statistical evaluation. Also, the use of such data as an example for other
statistical tests is hardly possible. For that reason, ermvnorm
allows to
reproduce data by simulation. In contrast to rmvnorm
of the package mvtnorm,
the function ermvnorm
produces random numbers which have EXACTLY the same
paramer values as specified by mean
and sd
. The correlation matrix
corr
is met only approximately.
The simple idea behind ermvnorm
is to apply rmvnorm
of the package
mvtnorm, but only for the first n-2 random numbers. The remaining 2 numbers are
obtained by solving a quadratic equation to achieve the specified values for the
mean vector and for the vector of standard deviations. Depending on the n-2 random
numbers, the underlying quadratic equation can possibly have no solution. In this
case, ermvnorm
creates a new set of n-2 random numbers until a valid data
set is obtained, or until the maximum number of tries mnt
is reached.
A matrix of random numbers with dimension n * length(mean).
This function is to be used only with caution. Usually, random numbers with exact
mean and standard deviation are not intended to be used. For example, simulations
concerning type I error or power of statistical tests cannot be based on
ermvnorm
.
Gemechis Djira Dilba and Mario Hasler
Hothorn, T. et al. (2001): On Multivariate t and Gauss Probabilities in R. R News 1, 27–29.
# Example 1: # A dataset representing one endpoint. set.seed(1234) dataset1 <- ermvnorm(n=10,mean=100,sd=10) dataset1 mean(dataset1) sd(dataset1) # Example 2: # A dataset representing two correlated endpoints. set.seed(5678) dataset2 <- ermvnorm(n=10,mean=c(10,120),sd=c(1,10),corr=rbind(c(1,0.7),c(0.7,1))) dataset2 mean(dataset2[,1]); mean(dataset2[,2]) sd(dataset2[,1]); sd(dataset2[,2]) round(cor(dataset2),3) pairs(dataset2) # Example 3: # A dataset representing three uncorrelated endpoints. set.seed(9101) dataset3 <- ermvnorm(n=20,mean=c(1,12,150),sd=c(0.5,2,20)) dataset3 mean(dataset3[,1]); mean(dataset3[,2]); mean(dataset3[,3]) sd(dataset3[,1]); sd(dataset3[,2]); sd(dataset3[,3]) pairs(dataset3) # Example 4: # A dataset representing four randomly correlated endpoints. set.seed(1121) dataset4 <- ermvnorm(n=10,mean=c(2,10,50,120),sd=c(1,4,8,10),corr=rcm(ncol=4)) dataset4 mean(dataset4[,1]); mean(dataset4[,2]); mean(dataset4[,3]); mean(dataset4[,4]) sd(dataset4[,1]); sd(dataset4[,2]); sd(dataset4[,3]); sd(dataset4[,4]) round(cor(dataset4),3) pairs(dataset4)
# Example 1: # A dataset representing one endpoint. set.seed(1234) dataset1 <- ermvnorm(n=10,mean=100,sd=10) dataset1 mean(dataset1) sd(dataset1) # Example 2: # A dataset representing two correlated endpoints. set.seed(5678) dataset2 <- ermvnorm(n=10,mean=c(10,120),sd=c(1,10),corr=rbind(c(1,0.7),c(0.7,1))) dataset2 mean(dataset2[,1]); mean(dataset2[,2]) sd(dataset2[,1]); sd(dataset2[,2]) round(cor(dataset2),3) pairs(dataset2) # Example 3: # A dataset representing three uncorrelated endpoints. set.seed(9101) dataset3 <- ermvnorm(n=20,mean=c(1,12,150),sd=c(0.5,2,20)) dataset3 mean(dataset3[,1]); mean(dataset3[,2]); mean(dataset3[,3]) sd(dataset3[,1]); sd(dataset3[,2]); sd(dataset3[,3]) pairs(dataset3) # Example 4: # A dataset representing four randomly correlated endpoints. set.seed(1121) dataset4 <- ermvnorm(n=10,mean=c(2,10,50,120),sd=c(1,4,8,10),corr=rcm(ncol=4)) dataset4 mean(dataset4[,1]); mean(dataset4[,2]); mean(dataset4[,3]); mean(dataset4[,4]) sd(dataset4[,1]); sd(dataset4[,2]); sd(dataset4[,3]); sd(dataset4[,4]) round(cor(dataset4),3) pairs(dataset4)
A plot of the results of SimCiDiff
and SimCiRat
,
respectively.
## S3 method for class 'SimCi' plot(x, xlim, xlab, ylim, ...)
## S3 method for class 'SimCi' plot(x, xlim, xlab, ylim, ...)
x |
an object of class "SimCi" as obtained by calling
|
xlim |
a numeric vector of length 2, giving the x coordinate range |
xlab |
a title for the x axis |
ylim |
a numeric vector of length 2, giving the y coordinate range |
... |
arguments to be passed to |
A plot of the confidence intervals of a "SimCi" object.
Christof Kluss and Mario Hasler
# 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 plot(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) par(mfrow=c(1,3)); plot(interv2)
# 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 plot(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) par(mfrow=c(1,3)); plot(interv2)
A short print out of the results of SimCiDiff
and SimCiRat
,
respectively.
## S3 method for class 'SimCi' print(x, digits = 4, ...)
## S3 method for class 'SimCi' print(x, digits = 4, ...)
x |
an object of class "SimCi" as obtained by calling
|
digits |
digits for rounding the results |
... |
arguments to be passed to |
A print out containing the estimates, degrees of freedom, raw and
simultaneous confidence intervals computed by SimCiDiff
or
SimCiRat
, respectively.
Mario Hasler
A short print out of the results of SimTestDiff
and SimTestRat
,
respectively.
## S3 method for class 'SimTest' print(x, digits = 4, ...)
## S3 method for class 'SimTest' print(x, digits = 4, ...)
x |
an object of class "SimTest" as obtained by calling
|
digits |
digits for rounding the results |
... |
arguments to be passed to |
A print out containing the margins, estimates, test statistics, degrees of
freedom, raw and adjusted p-values computed by SimTestDiff
or SimTestRat
, respectively.
Mario Hasler
Correlation matrices with random off-diagonal elements.
rcm(nrow = NULL, ncol = NULL)
rcm(nrow = NULL, ncol = NULL)
nrow |
the desired number of rows |
ncol |
the desired number of columns |
As a correlation matrix is symmetric, only one of nrow
or ncol
needs to be specified.
A symmetric correlation matrix with random elements.
Kornelius Rohmeyer and Mario Hasler
Holmes, R.B. (1991): On random correlation matrices. Siam Journal on Matrix Analysis and Applications 12, 239–272.
# Example 1: # A correlation matrix representing three randomly correlated endpoints. set.seed(1234) rcm(nrow=3) # Example 2: # A correlation matrix representing five randomly correlated endpoints. set.seed(5678) rcm(ncol=5)
# Example 1: # A correlation matrix representing three randomly correlated endpoints. set.seed(1234) rcm(nrow=3) # Example 2: # A correlation matrix representing five randomly correlated endpoints. set.seed(5678) rcm(ncol=5)
Simultaneous confidence intervals for general contrasts (linear functions) of normal means (e.g., "Dunnett", "Tukey", "Williams" ect.), and for single or multiple endpoints (primary response variables) simultaneously. The procedure of Hasler and Hothorn (2011) <doi:10.2202/1557-4679.1258> is applied for differences of means of normally distributed data. The variances/ covariance matrices of the treatment groups (containing the covariances between the endpoints) may be assumed to be equal or possibly unequal for the different groups (Hasler, 2014 <doi:10.1515/ijb-2012-0015>). 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) <doi:10.1002/bimj.200710466>.
## Default S3 method: SimCiDiff(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, ContrastMat = NULL, alternative = "two.sided", covar.equal = FALSE, conf.level = 0.95, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimCiDiff(formula, ...)
## Default S3 method: SimCiDiff(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, ContrastMat = NULL, alternative = "two.sided", covar.equal = FALSE, conf.level = 0.95, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimCiDiff(formula, ...)
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
|
formula |
a formula specifying a numerical response and a grouping factor (e.g. response ~ treatment) |
na.action |
a character string indicating what should happen when the data
contain |
type |
a character string, defining the type of contrast, with the following options:
note that |
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 |
covar.equal |
a logical variable indicating whether to treat the variances/
covariance matrices of the treatment groups (containing the
covariances between the endpoints) as being equal;
if |
conf.level |
a numeric value defining the simultaneous confidence level |
CorrMatDat |
a correlation matrix of the endpoints, if |
... |
arguments to be passed to SimCiDiff.default |
The interest is in simultaneous confidence intervals for several linear combinations
(contrasts) of treatment means in a one-way ANOVA model, and for single or
multiple endpoints simultaneously. 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 heteroscedasticity and multiple endpoints. The user is
also free to create other interesting problem-specific contrasts. Approximate
multivariate t-distributions are used to calculate lower and upper limits
(Hasler and Hothorn, 2011 <doi:10.2202/1557-4679.1258>). Simultaneous tests based on
these intervals control the familywise error rate in admissible ranges and in the
strong sense. The variances/ 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 variance/ covariance matrix is used, otherwise approximations to the degrees
of freedom (Satterthwaite, 1946) are used (Hasler, 2014 <doi:10.1515/ijb-2012-0015>;
Hasler and Hothorn, 2008 <doi:10.1002/bimj.200710466>). Unequal covariance matrices
occure if variances or correlations of some endpoints differ depending on the
treatment groups.
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 |
if not prespecified by |
CorrMatComp |
the estimated correlation matrix of the comparisons |
degr.fr |
a matrix of degrees of freedom |
By default (na.action="na.error"
), the procedure stops if there are
missing values. A new experimental version for missing values is used if
na.action="multi.df"
. If covar.equal=TRUE
, 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 intervals have the same direction for all comparisons and endpoints
(alternative="..."
). In case of doubt, use "two.sided"
.
Mario Hasler
Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17–28, <doi:10.1515/ijb-2012-0015>.
Hasler, M. and Hothorn, L.A. (2011): A Dunnett-type procedure for multiple endpoints. The International Journal of Biostatistics 7, Article 3, <doi:10.2202/1557-4679.1258>.
Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793–800, <doi:10.1002/bimj.200710466>.
SimTestDiff
, SimTestRat
,
SimCiRat
# Example 1: # Simultaneous confidence intervals related to a comparison of the groups # B and H against the standard S, for 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 plot(interv1) # Example 2: # Simultaneous confidence intervals related to a comparisons of the groups # B and H against the standard S, simultaneously for 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) plot(interv2)
# Example 1: # Simultaneous confidence intervals related to a comparison of the groups # B and H against the standard S, for 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 plot(interv1) # Example 2: # Simultaneous confidence intervals related to a comparisons of the groups # B and H against the standard S, simultaneously for 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) plot(interv2)
Simultaneous confidence intervals for general contrasts (linear functions) of normal means (e.g., "Dunnett", "Tukey", "Williams" ect.), and for single or multiple endpoints (primary response variables) simultaneously. The procedure of Hasler and Hothorn (2012) <doi:10.1080/19466315.2011.633868> is applied for ratios of means of normally distributed data. The variances/ covariance matrices of the treatment groups (containing the covariances between the endpoints) may be assumed to be equal or possibly unequal for the different groups (Hasler, 2014 <doi:10.1515/ijb-2012-0015>). 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) <doi:10.1002/bimj.200710466>.
## Default S3 method: SimCiRat(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, Num.Contrast = NULL, Den.Contrast = NULL, alternative = "two.sided", covar.equal = FALSE, conf.level = 0.95, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimCiRat(formula, ...)
## Default S3 method: SimCiRat(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, Num.Contrast = NULL, Den.Contrast = NULL, alternative = "two.sided", covar.equal = FALSE, conf.level = 0.95, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimCiRat(formula, ...)
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
|
formula |
a formula specifying a numerical response and a grouping factor (e.g. response ~ treatment) |
na.action |
a character string indicating what should happen when the data
contain |
type |
a character string, defining the type of contrast, with the following options:
note that |
base |
a single integer specifying the control group for Dunnett contrasts, ignored otherwise |
Num.Contrast |
a numerator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
Den.Contrast |
a denominator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
alternative |
a character string specifying the alternative hypothesis,
must be one of |
covar.equal |
a logical variable indicating whether to treat the variances/
covariance matrices of the treatment groups (containing the
covariances between the endpoints) as being equal;
if |
conf.level |
a numeric value defining the simultaneous confidence level |
CorrMatDat |
a correlation matrix of the endpoints, if |
... |
arguments to be passed to SimCiRat.default |
The interest is in simultaneous confidence intervals for several linear combinations
(contrasts) of treatment means in a one-way ANOVA model, and for single or
multiple endpoints simultaneously. 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 heteroscedasticity and multiple endpoints, and in
terms of ratios of means. The user is also free to create other interesting
problem-specific contrasts. Approximate multivariate t-distributions are used
to calculate lower and upper limits (Hasler and Hothorn, 2012
<doi:10.1080/19466315.2011.633868>). Simultaneous tests based on these intervals
control the familywise error rate in admissible ranges and in the strong sense. The
variances/ 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 variance/ covariance
matrix is used, otherwise approximations to the degrees of freedom
(Satterthwaite, 1946) are used (Hasler, 2014 <doi:10.1515/ijb-2012-0015>;
Hasler and Hothorn, 2008 <doi:10.1002/bimj.200710466>). Unequal covariance matrices
occure if variances or correlations of some endpoints differ depending on the
treatment groups.
An object of class SimCi containing:
estimate |
a matrix of estimated ratios |
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 |
if not prespecified by |
CorrMatComp |
the estimated correlation matrix of the comparisons |
degr.fr |
a matrix of degrees of freedom |
By default (na.action="na.error"
), the procedure stops if there are
missing values. A new experimental version for missing values is used if
na.action="multi.df"
. If covar.equal=TRUE
, 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 intervals have the same direction for all comparisons and endpoints
(alternative="..."
). In case of doubt, use "two.sided"
.
The correlation matrix for the multivariate t-distribution also depends
on the unknown ratios. The same problem also arises for the degrees of freedom
if the covariance matrices for the different groups are assumed to be unequal
(covar.equal=FALSE
). Both problems are handled by a plug-in approach, see
the references therefore.
Mario Hasler
Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17–28, <doi:10.1515/ijb-2012-0015>.
Hasler, M. and Hothorn, L.A. (2012): A multivariate Williams-type trend procedure. Statistics in Biopharmaceutical Research 4, 57–65, <doi:10.1080/19466315.2011.633868>.
Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793–800, <doi:10.1002/bimj.200710466>.
Dilba, G. et al. (2006): Simultaneous confidence sets and confidence intervals for multiple ratios. Journal of Statistical Planning and Inference 136, 2640–2658, <DOI:10.1016/j.jspi.2004.11.009>.
SimTestRat
, SimTestDiff
,
SimCiDiff
# Example 1: # Simultaneous confidence intervals related to a comparison of the groups # B and H against the standard S, for endpoint Thromb.count, assuming unequal # variances for the groups. This is an extension of the well-known Dunnett- # intervals to the case of heteroscedasticity and in terms of ratios of means # instead of differences. data(coagulation) interv1 <- SimCiRat(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) interv1 plot(interv1) # Example 2: # Simultaneous confidence intervals related to a comparisons of the groups # B and H against the standard S, simultaneously for 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 and in terms of ratios of means instead of differences. data(coagulation) interv2 <- SimCiRat(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(interv2) plot(interv2)
# Example 1: # Simultaneous confidence intervals related to a comparison of the groups # B and H against the standard S, for endpoint Thromb.count, assuming unequal # variances for the groups. This is an extension of the well-known Dunnett- # intervals to the case of heteroscedasticity and in terms of ratios of means # instead of differences. data(coagulation) interv1 <- SimCiRat(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) interv1 plot(interv1) # Example 2: # Simultaneous confidence intervals related to a comparisons of the groups # B and H against the standard S, simultaneously for 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 and in terms of ratios of means instead of differences. data(coagulation) interv2 <- SimCiRat(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(interv2) plot(interv2)
Simultaneous tests for general contrasts (linear functions) of normal means (e.g., "Dunnett", "Tukey", "Williams" ect.), and for single or multiple endpoints (primary response variables) simultaneously. The procedure of Hasler and Hothorn (2011) <doi:10.2202/1557-4679.1258> is applied for differences of means of normally distributed data. The variances/ covariance matrices of the treatment groups (containing the covariances between the endpoints) may be assumed to be equal or possibly unequal for the different groups (Hasler, 2014 <doi:10.1515/ijb-2012-0015>). 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) <doi:10.1002/bimj.200710466>.
## Default S3 method: SimTestDiff(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, ContrastMat = NULL, alternative = "two.sided", Margin = 0, covar.equal = FALSE, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimTestDiff(formula, ...)
## Default S3 method: SimTestDiff(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, ContrastMat = NULL, alternative = "two.sided", Margin = 0, covar.equal = FALSE, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimTestDiff(formula, ...)
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
|
formula |
a formula specifying a numerical response and a grouping factor (e.g. response ~ treatment) |
na.action |
a character string indicating what should happen when the data
contain |
type |
a character string, defining the type of contrast, with the following options:
note that |
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 |
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 |
covar.equal |
a logical variable indicating whether to treat the variances/
covariance matrices of the treatment groups (containing the
covariances between the endpoints) as being equal;
if |
CorrMatDat |
a correlation matrix of the endpoints, if |
... |
arguments to be passed to SimTestDiff.default |
The interest is in simultaneous tests for several linear combinations (contrasts) of
treatment means in a one-way ANOVA model, and for single or multiple endpoints
simultaneously. For example, the all-pair comparison of Tukey (1953) and the many-
to-one comparison of Dunnett (1955) are implemented, but allowing for
heteroscedasticity and multiple endpoints. The user is also free to create other
interesting problem-specific contrasts. Approximate multivariate t-
distributions are used to calculate (adjusted) p-values (Hasler and Hothorn,
2011 <doi:10.2202/1557-4679.1258>). This approach controls the familywise error rate
in admissible ranges and in the strong sense. The variances/ 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 variance/ covariance matrix is used, otherwise
approximations to the degrees of freedom (Satterthwaite, 1946) are used (Hasler,
2014 <doi:10.1515/ijb-2012-0015>; Hasler and Hothorn, 2008
<doi:10.1002/bimj.200710466>). Unequal covariance matrices occure if variances or
correlations of some endpoints differ depending on the treatment groups.
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 |
if not prespecified by |
CorrMatComp |
the estimated correlation matrix of the comparisons |
degr.fr |
a matrix of degrees of freedom |
By default (na.action="na.error"
), the procedure stops if there are
missing values. A new experimental version for missing values is used if
na.action="multi.df"
. If covar.equal=TRUE
, 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 doubt, 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.
Mario Hasler
Hasler, M. and Hothorn, L.A. (2018): Multi-arm trials with multiple primary endpoints and missing values. Statistics in Medicine 37, 710–721, <doi:10.1002/sim.7542>.
Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17–28, <doi:10.1515/ijb-2012-0015>.
Hasler, M. and Hothorn, L.A. (2011): A Dunnett-type procedure for multiple endpoints. The International Journal of Biostatistics 7, Article 3, <doi:10.2202/1557-4679.1258>.
Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793–800, <doi:10.1002/bimj.200710466>.
SimCiDiff
, SimTestRat
,
SimCiRat
# Example 1: # A comparison of the groups B and H against the standard S, for endpoint # Thromb.count, assuming unequal variances for the groups. This is an # extension of the well-known Dunnett-test to the case of heteroscedasticity. data(coagulation) comp1 <- SimTestDiff(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) comp1 # Example 2: # A comparison of the groups B and H against the standard S, simultaneously # for all endpoints, assuming unequal covariance matrices for the groups. This is # an extension of the well-known Dunnett-test to the case of heteroscedasticity # and multiple endpoints. data(coagulation) comp2 <- SimTestDiff(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(comp2)
# Example 1: # A comparison of the groups B and H against the standard S, for endpoint # Thromb.count, assuming unequal variances for the groups. This is an # extension of the well-known Dunnett-test to the case of heteroscedasticity. data(coagulation) comp1 <- SimTestDiff(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) comp1 # Example 2: # A comparison of the groups B and H against the standard S, simultaneously # for all endpoints, assuming unequal covariance matrices for the groups. This is # an extension of the well-known Dunnett-test to the case of heteroscedasticity # and multiple endpoints. data(coagulation) comp2 <- SimTestDiff(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(comp2)
Simultaneous tests for general contrasts (linear functions) of normal means (e.g., "Dunnett", "Tukey", "Williams" ect.), and for single or multiple endpoints (primary response variables) simultaneously. The procedure of Hasler and Hothorn (2012) <doi:10.1080/19466315.2011.633868> is applied for ratios of means of normally distributed data. The variances/ covariance matrices of the treatment groups (containing the covariances between the endpoints) may be assumed to be equal or possibly unequal for the different groups (Hasler, 2014 <doi:10.1515/ijb-2012-0015>). 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) <doi:10.1002/bimj.200710466>.
## Default S3 method: SimTestRat(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, Num.Contrast = NULL, Den.Contrast = NULL, alternative = "two.sided", Margin = 1, covar.equal = FALSE, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimTestRat(formula, ...)
## Default S3 method: SimTestRat(data, grp, resp = NULL, na.action = "na.error", type = "Dunnett", base = 1, Num.Contrast = NULL, Den.Contrast = NULL, alternative = "two.sided", Margin = 1, covar.equal = FALSE, CorrMatDat = NULL, ...) ## S3 method for class 'formula' SimTestRat(formula, ...)
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
|
formula |
a formula specifying a numerical response and a grouping factor (e.g. response ~ treatment) |
na.action |
a character string indicating what should happen when the data
contain |
type |
a character string, defining the type of contrast, with the following options:
note that |
base |
a single integer specifying the control group for Dunnett contrasts, ignored otherwise |
Num.Contrast |
a numerator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
Den.Contrast |
a denominator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
alternative |
a character string specifying the alternative hypothesis,
must be one of |
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 |
covar.equal |
a logical variable indicating whether to treat the variances/
covariance matrices of the treatment groups (containing the
covariances between the endpoints) as being equal;
if |
CorrMatDat |
a correlation matrix of the endpoints, if |
... |
arguments to be passed to SimTestRat.default |
The interest is in simultaneous tests for several linear combinations (contrasts) of
treatment means in a one-way ANOVA model, and for single or multiple endpoints
simultaneously. For example, the all-pair comparison of Tukey (1953) and the many-
to-one comparison of Dunnett (1955) are implemented, but allowing for
heteroscedasticity and multiple endpoints, and in terms of ratios of means. The user
is also free to create other interesting problem-specific contrasts. Approximate
multivariate t-distributions are used to calculate (adjusted) p-values
(Hasler and Hothorn, 2012 <doi:10.1080/19466315.2011.633868>). This approach
controls the familywise error rate in admissible ranges and in the strong sense. The
variances/ 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 variance/ covariance
matrix is used, otherwise approximations to the degrees of freedom (Satterthwaite,
1946) are used (Hasler, 2014 <doi:10.1515/ijb-2012-0015>; Hasler and Hothorn, 2008
<doi:10.1002/bimj.200710466>). Unequal covariance matrices occure if variances or
correlations of some endpoints differ depending on the treatment groups.
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 |
if not prespecified by |
CorrMatComp |
the estimated correlation matrix of the comparisons |
degr.fr |
a matrix of degrees of freedom |
By default (na.action="na.error"
), the procedure stops if there are
missing values. A new experimental version for missing values is used if
na.action="multi.df"
. If covar.equal=TRUE
, 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 doubt, 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.
Mario Hasler
Hasler, M. (2014): Multiple contrast tests for multiple endpoints in the presence of heteroscedasticity. The International Journal of Biostatistics 10, 17–28, <doi:10.1515/ijb-2012-0015>.
Hasler, M. and Hothorn, L.A. (2012): A multivariate Williams-type trend procedure. Statistics in Biopharmaceutical Research 4, 57–65, <doi:10.1080/19466315.2011.633868>.
Hasler, M. and Hothorn, L.A. (2008): Multiple contrast tests in the presence of heteroscedasticity. Biometrical Journal 50, 793–800, <doi:10.1002/bimj.200710466>.
Dilba, G. et al. (2006): Simultaneous confidence sets and confidence intervals for multiple ratios. Journal of Statistical Planning and Inference 136, 2640–2658, <doi:10.1016/j.jspi.2004.11.009>.
SimCiRat
, SimTestDiff
,
SimCiDiff
# Example 1: # A comparison of the groups B and H against the standard S, for endpoint # Thromb.count, assuming unequal variances for the groups. This is an # extension of the well-known Dunnett-test to the case of heteroscedasticity # and in terms of ratios of means instead of differences. data(coagulation) comp1 <- SimTestRat(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) comp1 # Example 2: # A comparison of the groups B and H against the standard S, simultaneously # for all endpoints, assuming unequal covariance matrices for the groups. This is # an extension of the well-known Dunnett-test to the case of heteroscedasticity # and multiple endpoints and in terms of ratios of means instead of differences. data(coagulation) comp2 <- SimTestDiff(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(comp2)
# Example 1: # A comparison of the groups B and H against the standard S, for endpoint # Thromb.count, assuming unequal variances for the groups. This is an # extension of the well-known Dunnett-test to the case of heteroscedasticity # and in terms of ratios of means instead of differences. data(coagulation) comp1 <- SimTestRat(data=coagulation, grp="Group", resp="Thromb.count", type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) comp1 # Example 2: # A comparison of the groups B and H against the standard S, simultaneously # for all endpoints, assuming unequal covariance matrices for the groups. This is # an extension of the well-known Dunnett-test to the case of heteroscedasticity # and multiple endpoints and in terms of ratios of means instead of differences. data(coagulation) comp2 <- SimTestDiff(data=coagulation, grp="Group", resp=c("Thromb.count","ADP","TRAP"), type="Dunnett", base=3, alternative="greater", covar.equal=FALSE) summary(comp2)
A detailed print out of the results of SimCiDiff
and SimCiRat
,
respectively.
## S3 method for class 'SimCi' summary(object, digits = 4, ...)
## S3 method for class 'SimCi' summary(object, digits = 4, ...)
object |
an object of class "SimCi" as obtained by calling
|
digits |
digits for rounding the results |
... |
arguments to be passed to |
A print out containing the estimates, degrees of freedom, raw and
simultaneous confidence intervals, estimated covariance and correlation
matrices of the data and of the comparisons computed by SimCiDiff
or SimCiRat
, respectively.
Mario Hasler
A detailed print out of the results of SimTestDiff
and SimTestRat
,
respectively.
## S3 method for class 'SimTest' summary(object, digits = 4, ...)
## S3 method for class 'SimTest' summary(object, digits = 4, ...)
object |
an object of class "SimTest" as obtained by calling
|
digits |
digits for rounding the results |
... |
arguments to be passed to |
A print out containing the estimates, test statistics, degrees of freedom,
raw and adjusted p-values, estimated covariance correlation
matrices of the data and of the comparisons computed by SimTestDiff
or SimTestRat
, respectively.
Mario Hasler