<div dir="ltr">Olá,<div><br></div><div>Eu costumo usar subset. Mas não sei se o erro é por causa disso. Se não funcionar, tente fornecer código que seja reproduzível.</div><div><br></div><div><br></div><div><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-size:16px">GLM.2 <- glm(dent ~ idcat2, family=binomial(logit), data=subset(reg, sexo == 1) )</span><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">Em 1 de dezembro de 2017 14:28, Luciane Maria Pilotto via R-br <span dir="ltr"><<a href="mailto:r-br@listas.c3sl.ufpr.br" target="_blank">r-br@listas.c3sl.ufpr.br</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29076"><span id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29154">Olá,</span></div><div id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29076"><span><br></span></div><div id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29076" dir="ltr"><span id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29373">estou tentando rodar análises de regressão separando por sexo (</span>data=reg[reg$sexo == 1, ]) e resulta no seguinte erro:</div><div id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29076" dir="ltr"><span><br></span></div><div style="margin-bottom:0cm;line-height:100%" dir="ltr" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29361">GLM.2 <- glm(dent ~ idcat2, family=binomial(logit), data=reg[reg$sexo == 1, ])</div><div style="margin-bottom:0cm;line-height:100%" dir="ltr" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29361"><br></div><div style="margin-bottom:0cm;line-height:100%" dir="ltr" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29362">Error in model.frame.default(formula = dent ~ idcat2, data = reg[reg$sexo == : </div><div style="margin-bottom:0cm;line-height:100%" dir="ltr" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29363"> comprimentos das variáveis diferem (encontradas em 'idcat2')</div><div style="margin-bottom:0cm;line-height:100%" dir="ltr" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29363"><br></div><div style="margin-bottom:0cm;line-height:100%" dir="ltr" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29363">Alguma dica?</div><div></div><div id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29075"> </div><div class="m_-1544479317140274004signature" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29043"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255)" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29042"><div id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29041"><b style="font-family:Arial;font-size:16px;color:rgb(56,118,29)" id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29074"> </b></div></div><div id="m_-1544479317140274004yui_3_16_0_ym19_1_1512132930165_29073">______________________________<wbr>___________<span class="HOEnZb"><font color="#888888"><br>Luciane Maria Pilotto<br><br></font></span></div></div></div></div><br>______________________________<wbr>_________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" rel="noreferrer" target="_blank">https://listas.inf.ufpr.br/<wbr>cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" rel="noreferrer" target="_blank">http://www.leg.ufpr.br/r-br-<wbr>guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><b><br></b></div><div dir="ltr"><b>Paulo Dick</b><div>Estatístico / <span style="font-size:12.8px">Epidemiologia em Saúde Pública</span></div><div><span style="font-size:12.8px"><br></span></div></div></div></div></div></div></div></div></div>
</div>