Deve haver alguns NA na variável idcat2. Remova-os e rode novamente<div><div><br></div><div>reg2<-reg[complete.cases(reg),]<br></div><div>GLM.2 <- glm(dent ~ idcat2, family=binomial(logit), data=reg2[reg2$sexo == 1, ])<br></div><br><signature>=========================================<br>Fernando Souza<br>Celular: (31)99796-8781 (Vivo)<br><a href="https://n1.nylas.com/link/8db19cbc29370ba38528e3f29c0f444cd1d9b1d76c3fba7c34ad8d30d8db45cf/0?redirect=mailto%3Ae-mail%253Anandodesouza%40gmail.com&recipient=r-br%40listas.c3sl.ufpr.br" target="_blank" style="background-color: rgb(255, 255, 255); outline: 0px; cursor: text;">E-mail:nandodesouza@gmail.com</a><br>==========================================</signature></div><img class="n1-open" width="0" height="0" style="border:0; width:0; height:0;" src="https://n1.nylas.com/open/8db19cbc29370ba38528e3f29c0f444cd1d9b1d76c3fba7c34ad8d30d8db45cf?recipient=r-br%40listas.c3sl.ufpr.br">
          <div class="gmail_quote nylas-quote nylas-quote-id-ccd204bd68d4fa50f2a22937f4006212d4fdb6451524eafaba07f55a8998ec33">
            <br>
            On Dez 1 2017, at 2:28 pm, Luciane Maria Pilotto via R-br <r-br@listas.c3sl.ufpr.br> wrote:
            <br>
            <blockquote class="gmail_quote"
              style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
              <body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1512132930165_29076"><span id="yui_3_16_0_ym19_1_1512132930165_29154">Olá,</span></div><div id="yui_3_16_0_ym19_1_1512132930165_29076"><span><br /></span></div><div id="yui_3_16_0_ym19_1_1512132930165_29076" dir="ltr"><span id="yui_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="yui_3_16_0_ym19_1_1512132930165_29076" dir="ltr"><span><br /></span></div><div style="margin-bottom: 0cm; line-height: 100%" dir="ltr" id="yui_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="yui_3_16_0_ym19_1_1512132930165_29361"><br /></div><div style="margin-bottom: 0cm; line-height: 100%" dir="ltr" id="yui_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="yui_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="yui_3_16_0_ym19_1_1512132930165_29363"><br /></div><div style="margin-bottom: 0cm; line-height: 100%" dir="ltr" id="yui_3_16_0_ym19_1_1512132930165_29363">Alguma dica?</div><div></div><div id="yui_3_16_0_ym19_1_1512132930165_29075"> </div><div id="yui_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="yui_3_16_0_ym19_1_1512132930165_29042"><div id="yui_3_16_0_ym19_1_1512132930165_29041"><b style="font-family:Arial;font-size:16px;color:rgb(56, 118, 29);" id="yui_3_16_0_ym19_1_1512132930165_29074">                   </b></div></div><div id="yui_3_16_0_ym19_1_1512132930165_29073">_________________________________________<br />Luciane Maria Pilotto<br /><br /></div></div></div></body><pre class="nylas-plaintext">_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forne�a c�digo m�nimo reproduz�vel.</pre>
            </blockquote>
          </div>