<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>Caros amigos, estou tentando fazer um estudo de regressão com duas variáveis preditoras. Dados e comandos abaixo:</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; "><div style="background-color: transparent; ">mus<-c(2,6,8,3,2,7,9,8,4,6)</div><div style="background-color: transparent; "> tr<-c("e","m","e","m","e","e","m","m","e","e")</div><div style="background-color: transparent;
 "> trh<-c(2.9,3.0,4.8,1.8,2.9,4.9,4.2,4.8,4.4,4.5)</div><div style="background-color: transparent; "> tipo<-ifelse(tr=="e",1,0) #codificar a variável tr, 1=eletrico 2=mecânico</div><div style="background-color: transparent; "><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; ">b1<-data.frame(mus,tipo,trh)</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; ">Quero fazer a análise  usando a variável tipo. </div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; "><br></div><div
 style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; ">São dois modelos: um quando o e=1 e o outro e=0.</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; "><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; ">m1<-lm(trh~mus+tipo=0, data=b1)</div></div><div></div><div>m2<-lm(trh~mus+tipo=1, data=b1)<br></div><div><br></div><div> Não estou conseguindo implementar, alguém poderia dar alguma sugestão?</div><div>[  ]'s.</div><div><br></div><div>Edson
 Lira<br>Estatístico<br>Manaus-Amazonas</div></div></body></html>