<html><body><div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:16px"><div id="yui_3_16_0_1_1435802423483_2176"><span id="yui_3_16_0_1_1435802423483_2606">Bom dia,</span></div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr"><span id="yui_3_16_0_1_1435802423483_26634">este é um CMR hipotético. </span></div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr"><br id="yui_3_16_0_1_1435802423483_26783"></div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">dados <- expand.grid(A=factor(paste("A", 1:3, sep="")),B=factor(paste("B", 1:4, sep="")), rep=1:4)</div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">dados$y <- rgamma(n=48,shape=2, scale = 2)</div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class=""><br></div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">summary(lm(y~rep, data = subset(dados,B=="B1")))</div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">plot(y ~resp) </div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">summary(lm(y~rep, data = subset(dados,B=="B2")))</div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">plot(y ~resp) <br></div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">summary(lm(y~rep, data = subset(dados,B=="B3")))</div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">plot(y ~resp) <br></div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class="">summary(lm(y~rep, data = subset(dados,B=="B4")))</div><div id="yui_3_16_0_1_1435802423483_2176" dir="ltr" class=""><br class=""></div><div id="yui_3_16_0_1_1435802423483_2390"><div id="yui_3_16_0_1_1435802423483_2389"><br></div><div id="yui_3_16_0_1_1435802423483_2389" dir="ltr">
Como posso automatizar estas regressões com um for? Alguma sugestão? Sem plot já está ótimo! </div><div id="yui_3_16_0_1_1435802423483_2389" dir="ltr"><br></div><div id="yui_3_16_0_1_1435802423483_2389" dir="ltr">Obrigado <br></div><div id="yui_3_16_0_1_1435802423483_2389"><br></div><div id="yui_3_16_0_1_1435802423483_2389"><br></div><div id="yui_3_16_0_1_1435802423483_2389">André Oliveira Souza<br></div><br><br><div id="yui_3_16_0_1_1435802423483_26577">
<br></div></div></div></body></html>