simtest.ratio: Simultaneous tests for ratios of normal means

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Performs simultaneous tests for several ratios of linear combinations of treatment means in the normal one-way ANOVA model with homogeneous variances.

Usage

1
2
3
simtest.ratio(formula, data, type = "Dunnett", base = 1,
 alternative = "two.sided", Margin.vec = NULL, FWER = 0.05,
 Num.Contrast = NULL, Den.Contrast = NULL, names = TRUE)

Arguments

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:

  • "Dunnett": many-to-one comparisons, with control in the denominator

  • "Tukey": all-pair comparisons

  • "Sequen": comparison of consecutive groups, where the group with lower order is the denomniator

  • "AVE": comparison of each group with average of all others, where the average is taken as denominator

  • "GrandMean": comparison of each group with grand mean of all groups, where the grand mean is taken as denominator

  • "Changepoint": ratio of averages of groups of higher order divided by averages of groups of lower order

  • "Marcus": Marcus contrasts as ratios

  • "McDermott": McDermott contrasts as ratios

  • "Williams": Williams contrasts as ratios

  • "UmbrellaWilliams": Umbrella-protected Williams contrasts as ratios

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:

  • "two.sided": for two-sided tests

  • "less": for lower tail tests

  • "greater": for upper tail tests

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

Details

Given a one-way 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, upper-tail 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 t-distribution. For multiplicity adjustments, we use the joint distribution of the T_i , i=1,...,r, which under the null hypotheses follows a central r-variate t-distribution. Adjusted p-values can be calculated by adapting the results of Westfall et al. (1999) for ratio formatted hypotheses.

Value

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.

Author(s)

Gemechis Dilba Djira

References

Dilba, G., Bretz, F., and Guiard, V. (2006). Simultaneous confidence sets and confidence intervals for multiple ratios. Journal of Statistical Planning and Inference 136, 2640-2658.

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, 65-81.

See Also

While print.simtest.ratio produces a small default print-out of the results,

summary.simtest.ratio can be used to produce a more detailed print-out, which is recommended if user-defined 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.

Examples

 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)

########################################################

# User-defined 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 non-inferior to the difference of Active control vs. Placebo 

# User-defined contrasts:

# Numerator Contrasts:

NC <- rbind(
"(D100-D0)" = c(0,-1,1,0,0),
"(D150-D0)" = c(0,-1,0,1,0),
 "(D50-D0)" = c(0,-1,0,0,1))

# Denominator Contrasts:

DC <- rbind(
"(AC-D0)" = c(1,-1,0,0,0),
"(AC-D0)" = c(1,-1,0,0,0),
"(AC-D0)" = 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 alpha-numeric 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)

schaarschmidt/mratios documentation built on May 29, 2019, 3:25 p.m.