Learn R Programming

BSagri (version 0.1-10)

IAcontrasts: Interaction contrasts for 2-factorial designs

Description

Builds a family of intercation contrasts for complete two-factorial designs.

Usage

IAcontrasts(type, k)

Arguments

type

a vector of two character strings, specifying the contrast type, currently, "Tukey", "Dunnett", "Sequence" or "Identity" are accepted

k

a vector of two integers, specifying the number of groups in each factor of the two-factorial design

Value

A matrix with k[1]*k[2] columns and a number of rows depending on type.

Details

Creates contrast matrices using contrMat from package multcomp, creates the kronecker product of both and creates suitable columnnames.

See Also

for 2-way interaction contrasts directly based on 2 contrasts matrices, see IAcontrastsCMAT; two possibilities to specify appropriate rownames are implemented in function c2compnames

Examples

Run this code
# NOT RUN {
IAC<-IAcontrasts(type=c("Tukey", "Tukey"), k=c(3,4))

IAC

IAC2<-c2compnames(IAC, ntype="sequ")
IAC2

# }

Run the code above in your browser using DataLab