<font face="trebuchet ms,sans-serif">O problema do seu código foi só a ordem das colunas, veja<br><br><span style="font-family:courier new,monospace">set.seed(123)<br>tratamento <- factor(rep(letters[1:3],each=10))<br>resposta <- rnorm(30,rep(c(1,1,4),each=10))<br>
<br>modelo1 <- lm(resposta~tratamento)<br>summary(modelo1)<br><br>modelo2 <- lm(resposta~tratamento,<br> contrasts=list(tratamento=contr.sum))<br>summary(modelo2)<br><br>contrasts(tratamento)<br>C(tratamento, contr=contr.sum)<br>
<br>modelo3 <- lm(resposta~tratamento,<br> contrasts=list(tratamento=<b>cbind(c(1,-1,0), c(1,0,-1))</b>))<br>summary(modelo3)<br><br>C(tratamento, contr=contr.sum) # ordem das colunas!!!<br><br>modelo4 <- lm(resposta~tratamento,<br>
contrasts=list(tratamento=<b>cbind(c(1,0,-1), c(0,1,-1))</b>))<br>summary(modelo4)<br><br>cbind(coef(modelo2), coef(modelo3), coef(modelo4))<br></span><br>À disposição.<br>Walmes.<br><br clear="all"></font><div>
<span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">Walmes Marques Zeviani</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">fone: (+55) 41 3361 3573</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">VoIP: (3361 3600) 1053 1173</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">e-mail: <a href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a><br>skype: walmeszeviani<br style="font-family:trebuchet ms,sans-serif"></span><span style="font-family:trebuchet ms,sans-serif">twitter: @walmeszeviani</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">homepage: <a href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a></span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">linux user number: 531218</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br></div><br>