Learn R Programming

BSagri (version 0.1-10)

IAcontrastsCMAT: Interaction contrasts for a two-factorial design

Description

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

Usage

IAcontrastsCMAT(CMAT1, CMAT2)

Arguments

CMAT1

a (named) contrast matrix

CMAT2

a (named) contrast matrix

Value

A matrix with k[1]*k[2] columns.

Details

Builds the kronecker product of CMAT1 and CMAT2 and creates suitable columnnames. Note that CMAt1 and CMAT2 are not checked, and hence its up to the user to define them suitably.

See Also

for interaction contrasts based on contrast definition and the number of levels of the factors in atwo-way layout, see IAcontrasts; two possibilities to specify appropriate rownames are implemented in function c2compnames

Examples

Run this code
# NOT RUN {

library(multcomp)


n1<-c(10,10,10,10)
names(n1)<-c("A","B","C","D")

n2<-c(3,3,3)
names(n2)<-c(1,2,3)

CMT1<-contrMat(n1, type="Tukey")

CMT2<-contrMat(n2, type="Tukey")

IAC<-IAcontrastsCMAT(CMAT1=CMT1, CMAT2=CMT2)

c2compnames(IAC, ntype="sequ")

###


n1<-c(10,10,10,10)
names(n1)<-c("A","B","C","D")

n2<-c(3,3,3)
names(n2)<-c(1,2,3)

CMD1<-contrMat(n1, type="Dunnett")

CMD2<-contrMat(n2, type="Dunnett")

IAC<-IAcontrastsCMAT(CMAT1=CMD1, CMAT2=CMD2)

c2compnames(IAC, ntype="sequ")


# }

Run the code above in your browser using DataLab