<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;"><span>Walmes, Alexandre e demais colaboradores da lista do R,</span></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Primeiramente quero agradecer pela resposta rápida ao meu questionamento. </span></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Da forma como eu
 coloquei o conjunto de dados no post anterior, realmente é de supor que mesmo não seja uma variável discreta (foi falha minha):</span></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: 'courier new', monospace;">da$y <- c(4.5, 25.5, 8.5, 12, 123, 19.5, 111.5, 83.5, 10, 4, 4.5,</span><br style="font-family: 'courier new', monospace;"><span style="font-family: 'courier new', monospace;">           90.5, 46.5, 61.5, 20.5, 33.5, 47.5, 39, 131.5, 68.5, 4,</span><br style="font-family: 'courier new', monospace;"><span style="font-family: 'courier new',
 monospace;">           10, 13.5, 10, 9, 0, 0, 0, 2, 0, 0, 0, 0, 12.5, 4.5, 6.5,</span><br style="font-family: 'courier new', monospace;"><span style="font-family: 'courier new', monospace;">           1, 0, 0, 1, 0, 0, 0.5, 0, 2, 2, 0.5, 0.5)</span><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: 'courier new', monospace;"><br></span></div><div style="font-family: 'courier new', monospace; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: 'courier new', monospace;">De fato, esses dados equivalem ao número de esporos de um fungo em suspensão/mL de água x </span><span style="font-family: 'Courier New', courier, monaco, monospace,
 sans-serif; font-size: 10pt;">10</span><sup style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">4</sup><span style="background-color: transparent;">, ou seja:</span></div><div style="background-color: transparent;"><font face="courier new, monospace" size="2"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'courier new', monospace; font-style: normal;"><font face="courier new, monospace" size="2">da$y1= c(45000, 255000, 85000, 12000, 1230000, 195000, 1115000, </font></div><div style="background-color: transparent;"><font face="courier new, monospace" size="2">         835000, 100000, 40000, 45000, 905000, 465000, 615000, </font></div><div style="background-color: transparent;"><font face="courier new, monospace" size="2">         205000, 335000, 475000, 390000, 1315000, 685000, 40000,</font></div><div
 style="background-color: transparent;"><font face="courier new, monospace" size="2">         100000, 135000, 100000, 90000, 0, 0, 0, 20000, 0, 0, 0,</font></div><div style="background-color: transparent;"><font face="courier new, monospace" size="2">         0, 125000, 45000, 650000, 10000, 0, 0, 10000, 0, 0, 5000,</font></div><div style="background-color: transparent;"><font face="courier new, monospace" size="2"><span style="background-color: transparent;"></span></font></div><div style="background-color: transparent;"><font face="courier new, monospace" size="2">         0, 20000, 20000, 5000, 5000)</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'courier new', monospace; font-style: normal;"><font face="courier new, monospace" size="2"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0);
 font-size: 13px; font-family: 'courier new', monospace; font-style: normal;">Sendo uma variável discreta, utilizei a distribuição de Poisson, conforme o código abaixo.</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'courier new', monospace; font-style: normal;"><font face="courier new, monospace" size="2"><br></font></div><div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">g0 <- glm(y1~isol + cult + isol:cult, family=poisson, data=da)</font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">summary(g0)</font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">anova(g0, test="Chisq")</font></div><div style="font-size: 13px;
 background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">isolcult <- interaction(da$isol, da$cult, drop=TRUE)</font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">m0 <- glm(da$y~isolcult, family=poisson)</font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">require(multcomp)</font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">glht.m0 <- glht(m0, mcp(isolcult = "Tukey"))</font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New,
 courier, monaco, monospace, sans-serif" size="2">summary(glht.m0)</font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="background-color: transparent;"><font size="2">Estando a função correta, conforme falou o Walmes, surgiram algumas dúvidas com relação aos contrastes gerados.</font></div><div style="background-color: transparent;"><span style="font-size: 13px; background-color: transparent;"><br></span></div><div style="background-color: transparent;"><span style="font-size: 13px; background-color: transparent;">Esses contrastes que são testados pelo teste z (contraste de Tukey) são baseados na distribuição normal? (sendo que o teste z pressupõe a normalidade dos dados
 para grandes amostras - normal 0,1). Se sim, é correto utilizar esse teste em situações de não normalidade de dados?</span></div><div style="background-color: transparent;"><span style="font-size: 13px; background-color: transparent;"><br></span></div><div style="background-color: transparent;"><span style="font-size: 13px; background-color: transparent;">É o teste z, resultante do R nesse caso específico, equivalente a um teste não paramétrico, como o de qui-quadrado?</span></div><div style="background-color: transparent;"><font size="2"><br></font></div><div style="background-color: transparent;"><font size="2">Quando eu utilizava o SAS, a ferramenta estatitica no proc GENMOD do SAS permitia a realização do teste de qui-quadrado para efetuar os contrates dentro da interação ou efeitos principais. Dessa forma, gostaria de saber de vcs, se é possível fazer isso também no R, utilizando o teste de qui-quadrado para testar as os efeitos
 principais e desdobramento das interações? </font></div><div style="background-color: transparent;"><font size="2"><br></font></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><font size="2">Mais uma vez, agradeço a todos antecipadamente pela atenção, e peço desculpas pelo excesso de perguntas em um único post.</font></div><div style="background-color: transparent;"><font size="2"><br></font></div><div style="background-color: transparent;"><font size="2"><br></font></div><div style="background-color: transparent;"><font size="2"><div style="font-size: 13px;">Att.,</div><div style="font-size: 13px;"><br></div><div style="font-size: 13px;">--</div><div style="font-size: 13px;">Wirton Macedo Coutinho</div><div style="font-size: 13px;">Pesquisador Fitopatologia</div><div style="font-size: 13px;">Embrapa Algodão</div><div style="font-size: 13px;">Rua Oswaldo Cruz, 1143, Centenário</div><div
 style="font-size: 13px;">Campina Grande PB</div><div style="font-size: 13px;">CEP 28428-095</div></font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="font-size: 13px; background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div></div><div style="font-family: 'courier new', monospace; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color: transparent;"><br></span></div>  <div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;"> <div style="font-family: 'times new roman', 'new york', times, serif;"> <div dir="ltr" style="font-family:
 'times new roman', 'new york', times, serif; font-size: 12pt;"> </div><div class="y_msg_container"><div id="yiv667551450"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br>
    <pre class="yiv667551450moz-signature"></pre>
  </div><div><div><br></div></div>

</div><div class="classic-row" style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13px;"><table class="classic-body" style="font-size: 1em; border-collapse: collapse; margin-bottom: 1em; table-layout: fixed; width: 1881px;"><tbody><tr><td class="classic-message" style="vertical-align: top; padding: 1em;"><div id="message4659775" class="message-text adbayes-content" style="cursor: text; overflow-x: auto;"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;"><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;"><a href="http://r-br.2285057.n4.nabble.com/template/NamlServlet.jtp?macro=buy_credits_page" style="font-size: 1em; font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; color: rgb(85, 26, 139);">Remove Ads</a><br></div></div></div></td></tr></tbody></table></div><div class="classic-row" style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif;
 font-size: 13px;"><div class="classic-header" style="height: 2.2em; clear: both; overflow: hidden;"><div class="classic-bar shaded-bg-color rounded-top" style="border-top-left-radius: 5px; border-top-right-radius: 5px; padding: 0.5em 0.3em; clear: both; height: 1.8em; background-color: rgb(238, 238, 238); background-position: initial initial; background-repeat: initial initial;"><div class="classic-author-name nowrap" style="white-space: nowrap; float: left; width: 140px; overflow: hidden; text-align: center; font-weight: bold;"><a href="http://r-br.2285057.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=229329" style="font-size: 1em; color: rgb(85, 26, 139);">ASANTOS</a></div><div class="classic-right-menu shaded-bg-color weak-color" style="float: right; padding-left: 1em; color: rgb(102, 102, 102);"><a href="http://r-br.2285057.n4.nabble.com/template/NamlServlet.jtp?macro=reply&node=4659777" rel="nofollow" style="font-size: 1em;
 color: rgb(85, 26, 139);">Reply</a> | <a style="font-size: 1em; color: rgb(85, 26, 139);" href="">Threaded</a> | <span id="dd_postdropdown4659777"><span id="postdropdown4659777" class="dropdown" style="padding-right: 0.5em;"><a title="Click for more options" style="font-size: 1em; color: rgb(85, 26, 139);" href="">More</a> <img src="http://r-br.2285057.n4.nabble.com/images/more.png" width="10" height="10"></span></span>   <img src="http://r-br.2285057.n4.nabble.com/images/flag_gray.png" class="report-flag" style="vertical-align: middle;"> <span id="starB4659777" style="cursor: pointer;"><img id="img-starB4659777" src="http://r-br.2285057.n4.nabble.com/images/icon_unstarred.png" class="star" alt="star" title="Add this item to your favorites list" style="width: 18px; height: 18px; vertical-align: middle;"></span></div><div class="classic-subject-line" style="left: 0.5em; overflow: hidden; height: 1.3em;
 position: relative;"><span class="post-date float-left" style="float: left; color: rgb(106, 106, 106); cursor: default;"><span id="d1372033768000-526">Jun 23, 2013; 9:29pm</span></span><h2 class="post-subject float-left adbayes-content" style="font-family: inherit; float: left; font-size: 13px; padding: 0px 0.5em 0px 0px; margin: 0px 0px 0px 1em; color: rgb(119, 119, 119); overflow: visible; white-space: nowrap; display: inline; cursor: default; width: 444.375px;">Re: [R-br] Contrastes para interação significativa em GLM</h2></div></div></div><table class="classic-body" style="font-size: 1em; border-collapse: collapse; margin-bottom: 1em; table-layout: fixed; width: 1881px;"><tbody><tr><td class="classic-author shaded-bg-color rounded-bottom" style="border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; vertical-align: top; text-align: center; width: 140px; padding-bottom: 1em; background-color: rgb(238, 238, 238); background-position:
 initial initial; background-repeat: initial initial;"><div class="avatar-outer" style="width: 140px; text-align: left;"><div class="avatar-inner" style="margin-left: 20px;"><a href="http://r-br.2285057.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=229329" rel="nofollow" title="View profile of ASANTOS" class="nowrap no-decoration" style="white-space: nowrap; text-decoration: none; font-size: 1em; color: rgb(85, 26, 139);"><img class="avatar medium-border-color" src="http://r-br.2285057.n4.nabble.com/file/a229329/avatar100.png" height="100" width="100" alt="ASANTOS" title="ASANTOS" style="color: inherit; line-height: 2em; vertical-align: -8px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; border: 2px solid rgb(204, 204, 204);"></a></div></div><div class="post-count229329 avatar-label weak-color" style="white-space: nowrap; font-size: 11px; color: rgb(102, 102,
 102);">216 posts</div></td><td class="classic-message" style="vertical-align: top; padding: 1em;"><div id="message4659777" class="message-text adbayes-content" style="cursor: text; overflow-x: auto;">Boa noite Wirton,<br><br>       Vejo problemas com o seu modelo:<br>Em summary(g0), o Residual deviance:  431.11  on 36  degrees of freedom esta com sobre dispersão e se fizer plot(m0), especificamente no gráfico Normal Q-Q versus Desvio padrão residual vera que o ajuste não ficou bom. Veja também que sua variável resposta da$y são dados contínuos e não discretos e não existe 0 na distribuição de Poisson.<br><br>Abraço,<br><br><pre class="moz-signature" cols="72">-- 
======================================================================
Alexandre dos Santos
Proteção Florestal
Coordenador do curso Técnico em Florestas
Vice Coordenador do curso de Engenharia Florestal 
IFMT - Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso
Campus Cáceres
Caixa Postal 244
Avenida dos Ramires, s/n
Bairro: Distrito Industrial 
Cáceres - MT                      CEP: 78.200-000
Fone: (+55) 65 8132-8112 (TIM)   (+55) 65 9686-6970 (VIVO)
<a href="http://r-br.2285057.n4.nabble.com/user/SendEmail.jtp?type=node&node=4659777&i=0" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">[hidden email]</a> 
        <a href="http://r-br.2285057.n4.nabble.com/user/SendEmail.jtp?type=node&node=4659777&i=1" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">[hidden email]</a>                    
======================================================================</pre><br><br><div class="moz-cite-prefix">Em 23/06/2013 20:08, Wirton Macedo Coutinho escreveu:<br></div><blockquote cite="mid:1372032519.33869.YahooMailNeo@web124702.mail.ne1.yahoo.com" type="cite"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;"><div style="font-size: 10pt;">Boa noite a todos,</div><div style="font-size: 10pt;"><br></div><div>Tenho um conjunto de dados em arranjo fatorial que não atendem as pressuposições de normalidade e homocesdacidade de variâncias. Para contornar esse problema, optei por fazer a análise do mesmo por GLM; no entanto,como houve efeito significativo da interação, fiquei na dúvida de como proceder para fazer o desdobramento e fazer comparações múltiplas entre os tratamentos.</div><div><br></div><div>Pesquisando na internet, encontrei um post que recomendava fazê-lo por meio de constrastes
 utilizando o pacote multcomp. Assim o fiz (como vcs podem conferir pelo código abaixo). No entanto, como migrei recentemente para o R, surgiu a dúvida se isso que fiz está correto ou não. Assim, gostaria da opinião de vcs sobre o código ou se tem uma outra forma de fazê-lo.</div><div><br></div><div><br></div><div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">da <- expand.grid(rep=1:4, isol=factor(1:6), cult=factor(1:2))</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">da$y <- c(4.5, 25.5, 8.5, 12, 123, 19.5, 111.5, 83.5, 10, 4, 4.5,</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">           90.5, 46.5, 61.5, 20.5, 33.5, 47.5, 39, 131.5, 68.5, 4,</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">           10, 13.5, 10, 9, 0,
 0, 0, 2, 0, 0, 0, 0, 12.5, 4.5, 6.5,</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">           1, 0, 0, 1, 0, 0, 0.5, 0, 2, 2, 0.5, 0.5)</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif"><br></font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">g0 <- glm(y~isol + cult + isol:cult, family=poisson, data=da)</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">summary(g0)</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">anova(g0, test="Chisq")</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif"><br></font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">isolcult <- interaction(da$isol, da$cult, drop=TRUE)</font></div><div><font size="2"
 face="Courier New, courier, monaco, monospace, sans-serif">m0 <- glm(da$y~isolcult, family=poisson)</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">require(multcomp)</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">glht.m0 <- glht(m0, mcp(isolcult = "Tukey"))</font></div><div><font size="2" face="Courier New, courier, monaco, monospace, sans-serif">summary(glht.m0)</font></div><div><font size="2" face="Courier New, courier, monaco, monospace,
              sans-serif"><br></font></div><div><font size="2" face="Courier New, courier, monaco, monospace,
              sans-serif"><br></font></div><div><font size="2" face="Courier New, courier, monaco, monospace,
              sans-serif"><div style="font-size: 13px;">Certo de contar com a boa vontade de todos, agradeço antecipadamente.</div><div style="font-size: 13px;"><br></div><div style="font-size: 13px;">Att.,</div><div style="font-size: 13px;"><br></div><div style="font-size: 13px;">--</div><div style="font-size: 13px;">Wirton Macedo Coutinho</div><div style="font-size: 13px;">Pesquisador Fitopatologia</div><div style="font-size: 13px;">Embrapa Algodão</div><div style="font-size: 13px;">Rua Oswaldo Cruz, 1143, Centenário</div><div style="font-size: 13px;">Campina Grande PB</div><div style="font-size: 13px;">CEP 28428-095</div></font></div></div><div>   </div></div><br><fieldset class="mimeAttachmentHeader"></fieldset><br><pre wrap="">_______________________________________________
R-br mailing list
<a href="http://r-br.2285057.n4.nabble.com/user/SendEmail.jtp?type=node&node=4659777&i=2" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">[hidden email]</a>
<a class="moz-txt-link-freetext" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a class="moz-txt-link-freetext" href="http://www.leg.ufpr.br/r-br-guia" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre></blockquote><br><pre class="moz-signature" cols="72"></pre><br>_______________________________________________ <br>R-br mailing list <br><a href="http://r-br.2285057.n4.nabble.com/user/SendEmail.jtp?type=node&node=4659777&i=3" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">[hidden email]</a> <br><a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">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="_top" rel="nofollow"
 link="external" style="font-size: 1em; color: rgb(85, 26, 139);">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</div></td></tr></tbody></table></div><div class="classic-row" style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13px;"><div class="classic-header" style="height: 2.2em; clear: both; overflow: hidden;"><div class="classic-bar shaded-bg-color rounded-top" style="border-top-left-radius: 5px; border-top-right-radius: 5px; padding: 0.5em 0.3em; clear: both; height: 1.8em; background-color: rgb(238, 238, 238); background-position: initial initial; background-repeat: initial initial;"><div class="classic-author-name nowrap" style="white-space: nowrap; float: left; width: 140px; overflow: hidden; text-align: center; font-weight: bold;"><a href="http://r-br.2285057.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=221231" style="font-size: 1em; color: rgb(85, 26, 139);">Walmes
 Zeviani 2</a></div><div class="classic-right-menu shaded-bg-color weak-color" style="float: right; padding-left: 1em; color: rgb(102, 102, 102);"><a href="http://r-br.2285057.n4.nabble.com/template/NamlServlet.jtp?macro=reply&node=4659791" rel="nofollow" style="font-size: 1em; color: rgb(85, 26, 139);">Reply</a> | <a style="font-size: 1em; color: rgb(85, 26, 139);" href="">Threaded</a> | <span id="dd_postdropdown4659791"><span id="postdropdown4659791" class="dropdown" style="padding-right: 0.5em;"><a title="Click for more options" style="font-size: 1em; color: rgb(85, 26, 139);" href="">More</a> <img src="http://r-br.2285057.n4.nabble.com/images/more.png" width="10" height="10"></span></span>   <img src="http://r-br.2285057.n4.nabble.com/images/flag_gray.png" class="report-flag" style="vertical-align: middle;"> <span id="starB4659791" style="cursor: pointer;"><img id="img-starB4659791"
 src="http://r-br.2285057.n4.nabble.com/images/icon_unstarred.png" class="star" alt="star" title="Add this item to your favorites list" style="width: 18px; height: 18px; vertical-align: middle;"></span></div><div class="classic-subject-line" style="left: 0.5em; overflow: hidden; height: 1.3em; position: relative;"><span class="post-date float-left" style="float: left; color: rgb(106, 106, 106); cursor: default;"><span id="d1372118681000-935">Jun 24, 2013; 9:04pm</span></span><h2 class="post-subject float-left adbayes-content" style="font-family: inherit; float: left; font-size: 13px; padding: 0px 0.5em 0px 0px; margin: 0px 0px 0px 1em; color: rgb(119, 119, 119); overflow: visible; white-space: nowrap; display: inline; cursor: default; width: 444.375px;">Re: [R-br] Contrastes para interação significativa em GLM</h2></div></div></div><table class="classic-body" style="font-size: 1em; border-collapse: collapse; margin-bottom: 1em; table-layout: fixed;
 width: 1881px;"><tbody><tr><td class="classic-author shaded-bg-color rounded-bottom" style="border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; vertical-align: top; text-align: center; width: 140px; padding-bottom: 1em; background-color: rgb(238, 238, 238); background-position: initial initial; background-repeat: initial initial;"><div class="avatar-outer" style="width: 140px; text-align: left;"><div class="avatar-inner" style="margin-left: 20px;"><a href="http://r-br.2285057.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=221231" rel="nofollow" title="View profile of Walmes Zeviani 2" class="nowrap no-decoration" style="white-space: nowrap; text-decoration: none; font-size: 1em; color: rgb(85, 26, 139);"><img class="avatar medium-border-color" src="http://r-br.2285057.n4.nabble.com/file/a221231/avatar100.png" height="100" width="100" alt="Walmes Zeviani 2" title="Walmes Zeviani 2" style="color: inherit; line-height: 2em;
 vertical-align: -8px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; border: 2px solid rgb(204, 204, 204);"></a></div></div><div class="post-count221231 avatar-label weak-color" style="white-space: nowrap; font-size: 11px; color: rgb(102, 102, 102);">725 posts</div></td><td class="classic-message" style="vertical-align: top; padding: 1em;"><div id="message4659791" class="message-text adbayes-content" style="cursor: text; overflow-x: auto;"><font face="trebuchet ms,sans-serif">O uso da função tá correto, no entanto os teus dados não são inteiros, como contagens, para você usar distribuição Poisson. Se os dados não são números de eventos, contagens, não há razão para usar Poisson. Penso que o seu dado seja contínuo e que uma transformação pode amenizar o desvio dos pressupostos. Pelo gráfico de diagnostico dos resíduos o que se vê é uma forte relação
 média-variância. A transformação Box-Cox sugeriu transformar com log. Veja o CMR.<br><br><span style="font-family: 'courier new', monospace;">da <- expand.grid(rep=1:4, isol=factor(1:6), cult=factor(1:2))<br>da$y <- c(4.5, 25.5, 8.5, 12, 123, 19.5, 111.5, 83.5, 10, 4, 4.5,<br>           90.5, 46.5, 61.5, 20.5, 33.5, 47.5, 39, 131.5, 68.5, 4,<br>           10, 13.5, 10, 9, 0, 0, 0, 2, 0, 0, 0, 0, 12.5, 4.5, 6.5,<br>           1, 0, 0, 1, 0, 0, 0.5, 0, 2, 2, 0.5, 0.5)<br><br>g0 <- lm(y~isol + cult + isol:cult, data=da)<br>par(mfrow=c(2,2))<br>plot(g0)<br>layout(1)<br><br>g0 <- lm(y+0.5~isol + cult + isol:cult, data=da)<br>MASS::boxcox(g0)<br><br>g0 <- lm(log(y+0.5)~isol + cult + isol:cult, data=da)<br>par(mfrow=c(2,2))<br>plot(g0)<br>layout(1)<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="http://r-br.2285057.n4.nabble.com/user/SendEmail.jtp?type=node&node=4659791&i=0" target="_top" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">[hidden email]</a><br>skype: walmeszeviani<br></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/~walmes" target="_blank" rel="nofollow" link="external" style="font-size: 1em; color: rgb(85, 26, 139);">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></div></div></td></tr></tbody></table></div><div id="message4659775" class="message-text adbayes-content" style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; cursor: text; overflow-x: auto;"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;"><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;">Boa noite a todos,</div><div style="font-size: 10pt;"><br></div><div style="background-color: transparent;">Tenho um conjunto de dados em arranjo fatorial que não atendem as pressuposições de normalidade e homocesdacidade de variâncias. Para contornar esse problema, optei por fazer a análise do mesmo por GLM; no entanto,como houve efeito significativo da
 interação, fiquei na dúvida de como proceder para fazer o desdobramento e fazer comparações múltiplas entre os tratamentos.</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">Pesquisando na internet, encontrei um post que recomendava fazê-lo por meio de constrastes utilizando o pacote multcomp. Assim o fiz (como vcs podem conferir pelo código abaixo). No entanto, como migrei recentemente para o R, surgiu a dúvida se isso que fiz está correto ou não. Assim, gostaria da opinião de vcs sobre o código ou se tem uma outra forma de fazê-lo.</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;"><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">da <- expand.grid(rep=1:4, isol=factor(1:6), cult=factor(1:2))</font></div><div
 style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">da$y <- c(4.5, 25.5, 8.5, 12, 123, 19.5, 111.5, 83.5, 10, 4, 4.5,</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">           90.5, 46.5, 61.5, 20.5, 33.5, 47.5, 39, 131.5, 68.5, 4,</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">           10, 13.5, 10, 9, 0, 0, 0, 2, 0, 0, 0, 0, 12.5, 4.5, 6.5,</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">           1, 0, 0, 1, 0, 0, 0.5, 0, 2, 2, 0.5, 0.5)</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace,
 sans-serif" size="2"><br></font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">g0 <- glm(y~isol + cult + isol:cult, family=poisson, data=da)</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">summary(g0)</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">anova(g0, test="Chisq")</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">isolcult <- interaction(da$isol, da$cult, drop=TRUE)</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif"
 size="2">m0 <- glm(da$y~isolcult, family=poisson)</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">require(multcomp)</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">glht.m0 <- glht(m0, mcp(isolcult = "Tukey"))</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">summary(glht.m0)</font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div style="background-color: transparent;"><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><div style="font-size: 13px;">Certo de
 contar com a boa vontade de todos, agradeço antecipadamente.</div><div style="font-size: 13px;"><br></div><div style="font-size: 13px;">Att.,</div><div style="font-size: 13px;"><br></div><div style="font-size: 13px;">--</div><div style="font-size: 13px;">Wirton Macedo Coutinho</div><div style="font-size: 13px;">Pesquisador Fitopatologia</div><div style="font-size: 13px;">Embrapa Algodão</div><div style="font-size: 13px;">Rua Oswaldo Cruz, 1143, Centenário</div><div style="font-size: 13px;">Campina Grande PB</div><div style="font-size: 13px;">CEP 28428-095</div></font></div></div><div style="background-color: transparent;">   </div></div><br>_______________________________________________ <br>R-br mailing list <br><a href="http://r-br.2285057.n4.nabble.com/user/SendEmail.jtp?type=node&node=4659775&i=0" target="_top" rel="nofollow" link="external" style="color: rgb(85, 26, 139); font-size: 1em;">[hidden
 email]</a> <br><a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_top" rel="nofollow" link="external" style="color: rgb(85, 26, 139); font-size: 1em;">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="_top" rel="nofollow" link="external" style="color: rgb(85, 26, 139); font-size: 1em;">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</div><div class="ad " style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; clear: both; margin: 2em 0px 1em; visibility: visible !important; height: auto !important; position: static !important; top: auto !important; left: auto !important; width: 615px !important;"><div class="div906986" style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13px; width: 300px; float: left; clear: none; margin-right: 15px;"><ins
 style="display: inline-table; visibility: visible; height: 250px; width: 300px; position: relative; border: none; margin: 0px; padding: 0px; top: auto !important; left: auto !important;"><ins id="aswift_0_anchor" style="display: block; visibility: visible; height: 250px; width: 300px; position: relative; border: none; margin: 0px; padding: 0px; top: auto !important; left: auto !important;"><iframe width="300" height="250" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" id="aswift_0" name="aswift_0" style="position: absolute; top: 0px; left: 0px; display: block !important; visibility: visible !important; height: 250px !important; width: 300px !important;"></iframe></ins></ins></div><div class="div647135" style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13px; width: 300px; float: left; clear: none;"><ins style="display: inline-table; visibility: visible; height:
 250px; width: 300px; position: relative; border: none; margin: 0px; padding: 0px; top: auto !important; left: auto !important;"><ins id="aswift_1_anchor" style="display: block; visibility: visible; height: 250px; width: 300px; position: relative; border: none; margin: 0px; padding: 0px; top: auto !important; left: auto !important;"><iframe width="300" height="250" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" id="aswift_1" name="aswift_1" style="position: absolute; top: 0px; left: 0px; display: block !important; visibility: visible !important; height: 250px !important; width: 300px !important;"></iframe></ins></ins></div></div></div> </div> </div>  </div></body></html>