contrMatRatio {mratios}R Documentation

Creates numerator and denominator contrast matrices for ratio-based hypotheses for common multiple comparison and trend test problems

Description

Creates numerator and denominator contrast matrices for some common multiple comparison and trend test problems, for internal use in the sci.ratio and simtest.ratio functions. A suggestion how to define contrast matrices for ratios analogously for most of the problems covered by the contrMat-function in the multcomp-package for differences of means.

Whether the given definitions of contrast matrices for trend test problems in terms of ratios make sense and how they are to be interpreted is to be discussed.

Usage

contrMatRatio(n, type = "Tukey", base = 1)

Arguments

n integer vector of sample sizes
type the type of multiple contrasts
    "Dunnett"
    many to one comparisons, with the control group in the denominator
    "Tukey"
    all-pair comparisons
    "Sequen"
    comparison of consecutive groups, where the groups of lower order is the denominator
    "AVE"
    comparison of each group with average of all others, where the average is taken as denominator
    "Changepoint"
    ratio of averages of groups of higher order divided by averages of groups of lower order
    "Marcus"
    Marcus contrasts defined for ratios
    "McDermott"
    McDermott contrasts for ratios
    "Williams"
    Williams contrasts for ratios
base a single integer specifying the control (i.e. denominator) group for "Dunnett" contrasts

Details

This is a simple adaption of the contrMat function in the package multcomp for ratio hypotheses.

Value

A list containing:

numC the (named) numerator contrast where rows correspond to contrasts
denC the (named) denominator contrast where rows correspond to contrasts
rnames a character vector with names of the contrasts

and the type of contrast as attr.

Author(s)

Frank Schaarschmidt, by slightly modifying the code of contrMat(multcomp)

See Also

contrMat(multcomp)

Examples


n=c(A=10,B=20,Z=10,D=10)

contrMatRatio(n=n, type="Dunnett", base=1)
contrMatRatio(n=n, type="Dunnett", base=3)

contrMatRatio(n=n, type="Tukey")
contrMatRatio(n=n, type="Sequen")
contrMatRatio(n=n, type="AVE")
contrMatRatio(n=n, type="Williams")


[Package mratios version 1.0 Index]