treatcon2cmat: Check or construct between-treatment contrast matrix as...

Description Usage Arguments Value

Description

Helper function to check a given (between-treatment) contrast matrix or contruct a suitable matrix given one of the character string available in contrMat(package multcomp). For internal use

Usage

1
treatcon2cmat(treatcon, base, ntab)

Arguments

treatcon

either a matrix with numeric entries, where each row specifies one contrasts between treatments, or a single character string; if a matrix: number of columns must equal the number of treatment levels in the factor variable if a character string: chracter string will be passed to the type-argument in contrMat (package multcomp); see ?contrMat for details

base

a single integer, indicating which treatment level shoudl serve as a control, when passed to contrMat (package multcomp) used if treatcon is a characted string, ignored, if treatcon is a matrix

ntab

a (named) vector with sample sizes in the treatment groups, to be passed to argument n in contrMat; ignored if treatcon is character (makes a difference for pooling contrasts only, i.e. "GrandMean", "AVE", "Williams" etc.)

Value

a matrix, for internal use


schaarschmidt/statintcov documentation built on May 29, 2019, 3:26 p.m.