<div dir="ltr">Odirley,<div><br></div><div>Sua informação sobre as somas quadráticas "não baterem" em relação ao Excel não parecem corretas, posto que os valores são iguais em ambas as tabelas que você postou.<br><br>Em relação aos valores F, não é possível discutir porque você não postou a linha de soma quadrática dos resíduos do Excel (e nem o nº de graus de liberdade) . </div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-03 19:07 GMT-02:00 Odirley Campos <span dir="ltr"><<a href="mailto:camposagro@yahoo.com.br" target="_blank">camposagro@yahoo.com.br</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:verdana,helvetica,sans-serif;font-size:13px"><div><font># Boa noite! Novamente venho recorrer a lista para tirar duvidas sobre desdobramento na ANOVA.</font></div><div dir="ltr"><font>#
Tenho resultados de materia seca de eucalipto de um experimento em
arranjo fatorial triplo (solo; nc; np) com # UE ditribuidas em DBC. <br></font></div><div dir="ltr"><font># Dados estão no: <a href="http://www.datafilehost.com/d/32efcd4b" target="_blank">http://www.datafilehost.com/d/32efcd4b</a></font></div><div dir="ltr"><font># Gostaria de corrigir os valores do Fcal no desdobramento das interações duplas solo:nc.</font></div><div dir="ltr"><font># Na anova geral (avi) o GL e SQ do residuo são obtidos normalmente:</font></div><div dir="ltr"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Lucida Console';font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-align:-webkit-left;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;background-color:rgb(225,226,229)"></span></div><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"><br><span style="background-color:rgb(253,248,105)"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:"Lucida Console";font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px"><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"><span style="color:blue"><font color="#cd232c"><span>avi<-aov(mspa~bloco + trat, data=a1)<br>anova(avi)</span></font><br></span></pre></span></span><br>Response: mspa
Df Sum Sq Mean Sq F value Pr(>F)
bloco 2 2 0.993 0.1636 0.8493
trat 59 4963 84.119 13.8640 <2e-16 ***
Residuals 118 716 6.067</pre><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"><br>#refiz no excel e os resultados batem <br></pre><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><font color="#cd232c">av1<-aov(mspa~bloco + solo*nc*np, data=a1) # com mais detalhes<br></font></div><div dir="ltr"><font color="#cd232c">anova(av1)</font></div><div dir="ltr"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Lucida Console';font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-align:-webkit-left;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;background-color:rgb(225,226,229)"></span></div><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"><br>Response: mspa
Df Sum Sq Mean Sq F value Pr(>F)
bloco 2 1.99 0.99 0.1636 0.84927
solo 5 1987.74 397.55 65.5217 < 2.2e-16 ***
nc 1 0.75 0.75 0.1232 0.72621
np 4 2350.35 587.59 96.8431 < 2.2e-16 ***
solo:nc 5 95.86 19.17 3.1599 0.01031 *
solo:np 20 395.63 19.78 3.2603 3.261e-05 ***
nc:np 4 10.54 2.64 0.4345 0.78348
solo:nc:np 20 122.12 6.11 1.0064 0.46028
Residuals 118 715.95 6.07 </pre><div dir="ltr"><br></div><div dir="ltr"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Lucida Console';font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-align:-webkit-left;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;background-color:rgb(225,226,229)"></span></div><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"><span style="white-space:pre-wrap;color:blue"></span># Após conferir no excel vi que: df, SS, MS, F e Pr estão corretos para av1<br># quando fui para o desdobramento conforme segue, obtive os resultados no R: <br><br><font color="#cd232c">av2 <- aov(mspa~bloco+solo/nc) #nc dentro solo<br>anova(av2)<br> <br>names(coef(av2)) <br>length(names(coef(av2)))</font><br> <br> # buscando as posiçoes por expressões regulares<br> <br><font color="#cd232c">grep("ES", names(coef(av2))[9:14]) <br>grep("EU_0-10", names(coef(av2))[9:14]) <br>grep("EU_40-60", names(coef(av2))[9:14])<br>grep("SE_0-10", names(coef(av2))[9:14])<br>grep("SE_40-60", names(coef(av2))[9:14])<br>grep("TM", names(coef(av2))[9:14])</font><br><br><br><font color="#cd232c">summary(av2, split=list("solo:nc"=list(<br> "ES"= c(1),<br> "EU_0-10"=c(2),<br> "EU_40-60"=c(3),<br> "SE_0-10"=c(4), <br> "SE_40-60"= c(5),<br> "TM"= c(6)<br> )))<br></font><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Lucida Console';font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-align:-webkit-left;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;background-color:rgb(225,226,229)"><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Lucida Console';font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-align:-webkit-left;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;background-color:rgb(225,226,229)"><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"><br># saida da av2 abaixo: <br><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Lucida Console';font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-align:-webkit-left;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;background-color:rgb(225,226,229)"><pre style="font-family:'Lucida Console';font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;word-break:break-all;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.2"> Df Sum Sq Mean Sq F value Pr(>F)
bloco 2 2 1.0 0.046 0.9552
solo 5 1988 397.5 18.359 1.73e-14 ***
solo:nc 6 97 16.1 0.744 0.6153
<span style="background-color:rgb(253,248,105)">solo:nc: ES 1 11 10.6 0.488 0.4859
solo:nc: EU_0-10 1 0 0.5 0.022 0.8817
solo:nc: EU_40-60 1 2 2.1 0.096 0.7570
solo:nc: SE_0-10 1 81 81.0 3.741 0.0548 .
solo:nc: SE_40-60 1 0 0.0 0.000 0.9875
solo:nc: TM 1 2 2.5 0.114 0.7362 </span>
Residuals 166 3595 21.7 </pre></span></pre></span></pre></span></pre><div> </div><div dir="ltr"><font># vi que na parte que me interessa em destaque a SQ e QM estão corretas, mas o Fcal e P-valor estão errados pois o GL, SQ e QM do residuo não estão corretos. Conforme conferi pelo excel: <br></font></div><div dir="ltr"><font># saida do excel<br></font></div><div dir="ltr"><font>
</font></div><div><font><span lang="EN-US">FV<span> </span><span> </span>Sum Sq<span> </span>Mean Sq<span>
</span>F value<span> </span><span> </span>Pr(>F)</span></font></div><font>
</font><div><font>solo:nc: ES<span> </span><span> </span>10.6<span> </span>10.6<span> </span><span>
</span>1.740<span> </span><span> </span>0.1897</font></div><font>
</font><div><font>solo:nc: EU_0-10<span> </span>0.5<span> </span>0.5<span> </span><span> </span>0.079<span> </span><span> </span>0.2213</font></div><font>
</font><div><font>solo:nc: EU_40-60<span> </span>2.1<span> </span>2.1<span> </span><span> </span>0.343<span> </span><span> </span>0.4406</font></div><font>
</font><div><font>solo:nc: SE_0-10<span> </span>81.0<span> </span>81.0<span> </span><span> </span>13.347<span> </span><span> </span>0.0004</font></div><font>
</font><div><font>solo:nc: SE_40-60<span> </span>0.0<span> </span>0.0<span> </span><span> </span>0.001<span> </span><span> </span>0.0236</font></div><font>
</font><div><font>solo:nc: TM<span> </span>2.5<span> </span>2.5<span> </span>0.406<span> </span><span> </span>0.4748</font></div>
<div dir="ltr"> </div><div dir="ltr"><font># Existe alguma maneira de informar o df e Sum Sq corretos (que estão na avi ou av1) no procedimento da av2 <br></font></div><div dir="ltr"><font># de modo que </font><font>o F e Pr sejam corrigidos na saida do comando?</font></div><div dir="ltr"><font>#
Ou como eu poderia extrair a coluna do Sum Sq ou Mean Sq na forma de
vector ou data.frame para fazer as correções manualmente no R?</font><br></div><div dir="ltr"><br></div><div><span></span></div><div> </div><div><div style="text-align:center">Odirley R. Campos<br>Engenheiro Agrônomo UFV/MG</div><div style="color:rgb(0,0,0);font-size:13px;font-family:arial,helvetica,clean,sans-serif;background-color:transparent;font-style:normal;text-align:center">Doutorando em Solos e Nutrição de Plantas UFV/MG<br><br></div></div></div></div><br>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br></div>