<font face="trebuchet ms,sans-serif">Edson,<br><br>Combine os resultados dos objetos "an" e "m1" abaixo em um novo data.frame. Ou você pode extrair a matriz do modelo e usa-la novamente dentro de outro lm(), pois a lm() pode receber fórmula (em que cada termo possui seus graus de liberdade reconhecidos) ou pode receber uma matriz (em que o número de colunas-1 da matriz é o grau de liberdade). Veja o CMR.<br>
<br><span style="font-family: courier new,monospace;">n <- 100</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">da <- data.frame(x=runif(n), z=3*runif(n))</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">da$y <- da$x+da$z+rnorm(n)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">m0 <- lm(y~1, da)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">m1 <- lm(y~x+z, da)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">an <- anova(m0, m1)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">str(an)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">str(m1)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">reg <- model.matrix(m1)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">m2 <- lm(y~reg, da)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">anova(m2)</span><br><br>À disposição.<br>Walmes.<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>