simtest.ratioVH {mratios} | R Documentation |
Performs simultaneous tests for several ratios of linear combinations of treatment means in a normal one-way layout, assuming normal distribution of the data allowing heterogeneous variances.
simtest.ratioVH(formula, data, type = "Dunnett", base = 1, alternative = "two.sided", Margin.vec = NULL, FWER = 0.05, Num.Contrast = NULL, Den.Contrast = NULL, names = TRUE)
formula |
A formula specifying a numerical response and a grouping factor (e.g., response ~ treatment) |
data |
A dataframe containing the response and group variable |
type |
type of contrast, with the following options:
|
base |
a single integer specifying the control (i.e. denominator) group for the Dunnett contrasts, ignored otherwise |
alternative |
a character string:
|
Margin.vec |
a single numerical value or vector of Margins under the null hypotheses, default is 1 |
FWER |
a single numeric value specifying the family-wise error rate to be controlled |
Num.Contrast |
Numerator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
Den.Contrast |
Denominator contrast matrix, where columns correspond to groups and rows correspond to contrasts |
names |
a logical value: if TRUE, the output will be named according to names of user defined contrast or factor levels |
The associated ratio test statistic T[i] has a t-distribution. Multiplicity adjustment is achieved by using quantiles of r r-variate t-distributions, which differ in the degree of freedom and share the correlation structure. The compariso-specific degrees of freedom are derived using the approximation according to Satterthwaite (1946).
An object of class simtest.ratio containing:
estimate |
a (named) vector of estimated ratios |
teststat |
a (named) vector of the calculated test statistics |
Num.Contrast |
the numerator contrast matrix |
Den.Contrast |
the denominator contrast matrix |
CorrMat |
the correlation matrix of the multivariate t-distribution calculated under the null hypotheses |
critical.pt |
the equicoordinate critical value of the multi-variate t-distribution for a specified FWER |
p.value.raw |
a (named) vector of unadjusted p-values |
p.value.adj |
a (named) vector of p-values adjusted for multiplicity |
Margin.vec |
the vector of margins under the null hypotheses |
and some other input arguments.
Mario Hasler, Frank Schaarschmidt
For the raw p-values, see
Hasler M, Vonk R, Hothorn LA (2007). Assessing non-inferiority of a new treatment in a three-arm trial in the presence of heteroscedasticity. Statistics in Medicine 27, 490-503.
For the multiplicity-adjusted p-values, there is so far no peer-reviewed publication available.
Satterthwaite, FE (1946). An approximate distribution of estimates of variance components. Biometrics 2, 110-114.
sci.ratioVH
for corresponding confidence intervals
data(Mutagenicity, package="mratios") boxplot(MN~Treatment, data=Mutagenicity) Mutas<-subset(Mutagenicity, Treatment!="Cyclo25") simtest.ratioVH(MN~Treatment, data=Mutagenicity, type="Dunnett", base=6, Margin.vec=1.2, alternative="less") # # # # # Unadjusted confidence intervals for multiple ratios # of means assuming heterogeneous group variances. # The following code produces the results given in Table # V of Hasler, Vonk and Hothorn (2007). # The upper confidence limits in Table V can produced # by calling: # Mutagenicity of the doses of the new compound, # expressed as ratio (DoseX-Vehicle)/(Cyclo25-Vehicle): # Check the order of the factor levels: levels(Mutagenicity$Treatment) # numerators: NC<-rbind( "Hydro30-Vehicle"=c(0,0,1,0,0,-1), "Hydro50-Vehicle"=c(0,0,0,1,0,-1), "Hydro75-Vehicle"=c(0,0,0,0,1,-1), "Hydro100-Vehicle"=c(0,1,0,0,0,-1) ) DC<-rbind( "Cyclo25-Vehicle"=c(1,0,0,0,0,-1), "Cyclo25-Vehicle"=c(1,0,0,0,0,-1), "Cyclo25-Vehicle"=c(1,0,0,0,0,-1), "Cyclo25-Vehicle"=c(1,0,0,0,0,-1) ) colnames(NC)<-colnames(DC)<-levels(Mutagenicity$Treatment) NC DC # The raw p-values are those presented in Table V: simtest.ratioVH(formula=MN~Treatment, data=Mutagenicity, Num.Contrast=NC, Den.Contrast=DC, alternative="less", Margin.vec=0.5, FWER=0.05)