IAcontrastsCMAT: Interaction contrasts for a two-factorial design

Description Usage Arguments Details Value See Also Examples

View source: R/IAcontrasts.R

Description

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

Usage

1
IAcontrastsCMAT(CMAT1, CMAT2)

Arguments

CMAT1

a (named) contrast matrix

CMAT2

a (named) contrast matrix

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.

Value

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

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

 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
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")

BSagri documentation built on May 29, 2017, 10:49 p.m.

Search within the BSagri package
Search all R packages, documentation and source code