Skip to content
Prev 14552 / 20628 Next

Orthogonal vs. Non-orthogonal contrasts

Dear Thierry,

Thank you very much for your reply.

I understood that the results of each main fixed factor (e.g., Factor 
A, B, C and D) are pointless, since the interaction factors affected 
the results of the main fixed factors. Actually, I manually coded the 
contrasts for all the fixed factors based on the hypothesis I wanted 
to test, as follows.

#Factor A (testing block)
PreVsMid<-c(1,-1,0)
PreVsPost<-c(-1,0,1)
contrasts(alldata$FactorA)<-cbind(PreVsMid,PreVsPost)
#Factor B (Trainer order)
IDVsDIS<-c(1,-1)
contrasts(alldata$FactorB)<-cbind(IDVsDIS)
#Factor C (Phonetic environment)
IniVsMid<-c(1,-1,0)
IniVsCls<-c(-1,0,1)
contrasts(alldata$FactorC)<-cbind(IniVsMid, IniVsCls)
#Factor D (Length of Experience, continuous variable)
alldata$FactorD<-as.numeric(alldata$FactorD)

What I really wanted to test is the interaction between Factor A and 
Factor B. Factor A has the two contrasts (i.e., PreVsMid (1,-1,0), 
PreVsPost(-1,0,1)), and Factor B has only one contrast (i.e., IDvsDIS 
(-1,1)) since there are only two levels in the Factor B. I tested 
whether there is a significant difference in the contrast of PreVsMid 
between the two levels of Factor B (IDvsDIS). Therefore, I did not use 
the dummy (simple effect) coding but used the effect coding.

As you suggested, I tried to figure out how to use the multcomp 
package. I found that the glht function in the packages allows me to 
test a variety of contrasts with a matrix. However, I felt that the 
contrasts I coded above are maybe enough to test my hypothesis, and I 
am wondering whether I should use the glht function for the contrasts.

Could you please let me know if there are any advantage of using the 
glht function?

I really appreciate your help.

Best wishes,
Yasu


On Thu, 26 May 2016 08:53:44 +0200
Thierry Onkelinx <thierry.onkelinx at inbo.be> wrote: