I am using the gls function of the nlme package to analyze data sets of soil respiration which have the following design: 3 complete blocks x 5 sampling dates (time from fertilization) x 3 fertilization levels. The fertilization dates are equal for all subjects (blocks) but not periodical (-46, 10, 24, 53, 123 days from the event). The code that I've been using is: fit.csnC<- gls(dno.C ~ block+Fertil*factor(Samp), data=dDakot, method="ML", corr=corCompSymm(, form=~1|block)) fit.arhnC<-update(fit.csnC, corr=corAR1(, form=~1|block), weight=varIdent(form =~1|Samp)) I've plotted the model with : plot(fit.csnC) plot(fit.csnC,dno.C ~ fitted(.), abline = c(0,1)) and residuals look fine, same as observed vs. fitted values. I would like to make sure that the model specification and the gls function are correct for this design. Then, if the model is OK, how do I do to test for main and simple effects, ie. how can I apply contrasts to the model?