<font face="trebuchet ms,sans-serif">Alexandre,<br><br>Deviance é o chi calculado, veja<br><br><span style="font-family: courier new,monospace;">y1 <- rpois(50, lambda = 4)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">trat <- rep(1:10,5)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mod.y1 <- glm(y1~1, family="poisson")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">mod.y2 <- glm(y1~trat, family="poisson")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">an <- anova(mod.y1, mod.y2, test="Chisq")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">an</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">pchisq(an$Deviance[2], df=an$Df[2], lower=FALSE)</span><br style="font-family: courier new,monospace;">
<br>À disposição.<br>Walmes.<br><br><br clear="all"></font><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></span><br style="font-family: trebuchet ms,sans-serif;">
<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>
<br><br><div class="gmail_quote">2011/9/9 ASANTOS <span dir="ltr"><<a href="mailto:alexandresantosbr@yahoo.com.br">alexandresantosbr@yahoo.com.br</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Boa tarde pessoal,<br>
<br>
Gostaria de saber como obter o valor de Chi calculado em uma anova() entre dois modelos usando GLM, exemplicando:<br>
<br>
y1<-rpois(50, lambda = 4)<br>
trat<-rep(1:10,5)<br>
mod.y1<-glm(y1~1, family="poisson")<br>
mod.y2<-glm(y1~trat, family="poisson")<br>
names(anova(mod.y1,mod.y2,<u></u>test="Chi"))<br>
[1] "Resid. Df" "Resid. Dev" "Df" "Deviance" "P(>|Chi|)"<br>
<br>
O problema é que a anova() me dá o valor do P(>|Chi|), mas não o valor de Chi calculado, onde eu gostaria de saber se é possível obter esse valor?<br>
Obrigado,<br>
<br>
Alexandre<br>
<br>
______________________________<u></u>_________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">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/<u></u>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-<u></u>guia</a>) e forneça código mínimo reproduzível.<br>
</blockquote></div><br>