Description Usage Arguments Details Value Author(s) References See Also Examples
Performs simultaneous tests for several ratios of linear combinations of treatment means in the normal oneway ANOVA model with homogeneous variances.
1 2 3 
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:
Note: type is ignored if Num.Contrast and Den.Contrast are specified by the user (See below). 
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 familywise 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 
Given a oneway ANOVA model, the interest is in simultaneous tests for several ratios of linear combinations of the treatment means. Let us denote the ratios by γ_i, i=1,...,r, and let ψ_i, i=1,...,r, denote the relative margins against which we compare the ratios. For example, uppertail simultaneous tests for the ratios are stated as
H_0i: γ_i <= ψ_i
versus
H_1i: γ_i > ψ_i, i=1,...,r
.
The associated likelihood ratio test statistic T_i has a tdistribution. For multiplicity adjustments, we use the joint distribution of the T_i , i=1,...,r, which under the null hypotheses follows a central rvariate tdistribution. Adjusted pvalues can be calculated by adapting the results of Westfall et al. (1999) for ratio formatted hypotheses.
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 tdistribution calculated under the null hypotheses 
critical.pt 
the equicoordinate critical value of the multivariate tdistribution for a specified FWER 
p.value.raw 
a (named) vector of unadjusted pvalues 
p.value.adj 
a (named) vector of pvalues adjusted for multiplicity 
Margin.vec 
the vector of margins under the null hypotheses 
and some other input arguments.
Gemechis Dilba Djira
Dilba, G., Bretz, F., and Guiard, V. (2006). Simultaneous confidence sets and confidence intervals for multiple ratios. Journal of Statistical Planning and Inference 136, 26402658.
Westfall, P.H., Tobias, R.D., Rom, D., Wolfinger, R.D., and Hochberg, Y. (1999). Multiple comparisons and multiple tests using the SAS system. SAS Institute Inc. Cary, NC, 6581.
While print.simtest.ratio produces a small default printout of the results,
summary.simtest.ratio can be used to produce a more detailed printout, which is recommended if userdefined contrasts are used,
sci.ratio for constructing simultaneous confidence intervals for ratios in oneway layout
See summary.glht(multcomp) for multiple tests for parameters of lm, glm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83  library(mratios)
########################################################
# Userdefined contrasts for comparisons
# between Active control, Placebo and three dosage groups:
data(AP)
AP
boxplot(prepost~treatment, data=AP)
# Test whether the differences of doses 50, 100, 150 vs. Placebo
# are noninferior to the difference of Active control vs. Placebo
# Userdefined contrasts:
# Numerator Contrasts:
NC < rbind(
"(D100D0)" = c(0,1,1,0,0),
"(D150D0)" = c(0,1,0,1,0),
"(D50D0)" = c(0,1,0,0,1))
# Denominator Contrasts:
DC < rbind(
"(ACD0)" = c(1,1,0,0,0),
"(ACD0)" = c(1,1,0,0,0),
"(ACD0)" = c(1,1,0,0,0))
NC
DC
noninf < simtest.ratio(prepost ~ treatment, data=AP,
Num.Contrast=NC, Den.Contrast=DC, Margin.vec=c(0.9,0.9,0.9),
alternative="greater")
summary( noninf )
#########################################################
## Not run:
# Some more examples on standard multiple comparison procedures
# stated in terms of ratio hypotheses:
# Comparisons vs. Control:
many21 < simtest.ratio(prepost ~ treatment, data=AP,
type="Dunnett")
summary(many21)
# Let the Placebo be the control group, which is the second level
# in alphanumeric order. A simultaneous test for superiority of
# the three doses and the Active control vs. Placebo could be
# done as:
many21P < simtest.ratio(prepost ~ treatment, data=AP,
type="Dunnett", base=2, alternative="greater", Margin.vec=1.1)
summary(many21P)
# All pairwise comparisons:
allpairs < simtest.ratio(prepost ~ treatment, data=AP,
type="Tukey")
summary(allpairs)
#######################################################
# Comparison to grand mean of all strains
# in the Penicillin example:
data(Penicillin)
CGM < simtest.ratio(diameter~strain, data=Penicillin, type="GrandMean")
CGM
summary(CGM)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.