Regressão logística usando o spss
Autor: LAFIEX UFVJM | Publicado: 2017-06-26T13:57:00-07:00


Autor: Pedro Henrique Figueiredo

No exemplo
será realizada a análise da influência da fraqueza muscular inspiratória no
comprometimento da capacidade funcional de uma amostra de pessoas com doença
cardiovascular, por meio da regressão logística.





PASSO 1:
DEFINIÇÃO E CODIFICAÇÃO DAS VARIÁVEIS

Variável
dependente: Comprometimento da Capacidade Funcional (“Baixa_CF”)



<!--[if gte vml 1]><v:shapetype id="_x0000_t75"
 coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
 filled="f" stroked="f">
 
 
  
  
  
  
  
  
  
  
  
  
  
  
 
 
 
<v:shape id="Imagem_x0020_1" o:spid="_x0000_s1038" type="#_x0000_t75"
 style='position:absolute;left:0;text-align:left;margin-left:-46.1pt;
 margin-top:8.45pt;width:521.5pt;height:276.05pt;z-index:-251658240;
 visibility:visible;mso-wrap-style:square;mso-width-percent:0;
 mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;
 mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;
 mso-position-horizontal:absolute;mso-position-horizontal-relative:text;
 mso-position-vertical:absolute;mso-position-vertical-relative:text;
 mso-width-percent:0;mso-height-percent:0;mso-width-relative:page;
 mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"
  o:title="" cropbottom="3835f"/>
 
<![endif]--><!--[if !vml]-->
PASSO 2: DETERMINAR
A FREQUÊNCIA DO EVENTO DE INTERESSE (comprometimento da capacidade funcional)

- Analisar
→Estatística descritiva →Frequências



<!--[if gte vml 1]><v:shape id="Imagem_x0020_3"
 o:spid="_x0000_s1036" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-23.7pt;margin-top:15.9pt;width:499.15pt;height:265.95pt;
 z-index:-251656192;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png"
  o:title="" cropbottom="3431f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->











<!--[if gte vml 1]><v:shape id="Imagem_x0020_4"
 o:spid="_x0000_s1035" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-23.35pt;margin-top:11.4pt;width:500.3pt;height:268.15pt;
 z-index:-251655168;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image007.png"
  o:title="" cropbottom="3053f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->

<!--[if gte vml 1]><v:shape id="Imagem_x0020_5"
 o:spid="_x0000_s1034" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-18.3pt;margin-top:35.9pt;width:490.85pt;height:261.45pt;
 z-index:-251654144;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png"
  o:title="" cropbottom="3428f"/>
 
<![endif]--><!--[if !vml]-->- Selecionar a variável dependente → ok





<!--[if gte vml 1]><v:shape id="Imagem_x0020_6"
 o:spid="_x0000_s1033" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-18.2pt;margin-top:18.45pt;width:493pt;height:260.05pt;
 z-index:-251653120;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png"
  o:title="" cropbottom="4033f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->



PASSO 3: DETERMINAR
A ASSOCIAÇÃO ENTRE A VARIÁVEL DEPENDENTE E AS INDEPENDENTES – TESTE
QUI-QUADRADO



- Analisar
→Estatísticas descritivas → Tabelas de referência cruzada → Estatísticas →
Qui-quadrado








<!--[if gte vml 1]><v:shape id="Imagem_x0020_8"
 o:spid="_x0000_s1032" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-32.15pt;margin-top:23.05pt;width:506.9pt;
 height:270pt;z-index:-251652096;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image013.png"
  o:title="" croptop="-1f" cropbottom="3423f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->

- Selecionar
as variáveis das linhas e colunas.

Exemplo:
Linhas – Fraqueza inspiratória 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Colunas – Comprometimento da Capacidade
Funcional









- Em
“Estatísiticas” selecionar o quadro “Qui-quadrado” → Continuar → ok





<!--[if gte vml 1]><v:shape id="Imagem_x0020_11"
 o:spid="_x0000_s1030" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-22.65pt;margin-top:16.15pt;width:497.6pt;
 height:265.95pt;z-index:-251650048;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image017.png"
  o:title="" cropbottom="3226f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->



<!--[if gte vml 1]><v:shape id="Imagem_x0020_12"
 o:spid="_x0000_s1029" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-21.9pt;margin-top:-9.15pt;width:495.55pt;
 height:262.25pt;z-index:-251649024;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image019.png"
  o:title="" cropbottom="3831f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->

- Repetir
este procedimento para todas as variáveis independentes ou preditoras (categóricas).


- Se p &lt;
0,20 → realizar a análise de regressão logística simples ou univariada. 





PASSO 4: REGRESSÃO
LOGÍSTICA SIMPLES OU UNIVARIADA 



- Analisar →
Regressão → Logística Binária 



<!--[if gte vml 1]><v:shape id="Imagem_x0020_13"
 o:spid="_x0000_s1028" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-21.9pt;margin-top:16.9pt;width:492pt;height:263pt;
 z-index:-251648000;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image021.png"
  o:title="" cropbottom="3226f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->









- Selecionar
a variável dependente e a preditora (independente).



<!--[if gte vml 1]><v:shape id="Imagem_x0020_15"
 o:spid="_x0000_s1027" type="#_x0000_t75" style='position:absolute;left:0;
 text-align:left;margin-left:-19pt;margin-top:16.95pt;width:492.2pt;height:262.2pt;
 z-index:-251646976;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:page;mso-height-relative:page'>
 <v:imagedata src="file:///C:\Users\larcerda\AppData\Local\Temp\msohtmlclip1\01\clip_image023.png"
  o:title="" cropbottom="3428f"/>
 
<![endif]--><!--[if !vml]-->
<!--[endif]-->











- Em
“categórico” identificar as variáveis categóricas 















- Selecionar
o indicador da variável preditora que será avaliado na análise.

No Exemplo,
o indicador a ser avaliado da variável “fraqueza muscular inspiratória” é o
indicador “0” (“sim”), conforme definido e codificado no PASSO 1. Assim, o
primeiro indicador (“0”) deve ser selecionado. 



No quadro
“Alterar contraste” → selecionar “primeiro” → Alterar → Continuar









- Em
“Opções” selecionar os itens do quadro “estatísticas e gráficos” → Continuar →
ok















- No quadro
“Variáveis da equação” observar o Fator de Chances (odds ratio) representado por “Exp(B)” e a significância estatística.













- Se p &lt;
0,10 → incluir a variável preditora na análise de regressão logística múltipla
ou multivariada.

- Repetir
este procedimento com todas as variáveis independentes.





PASSO 5: REGRESSÃO
LOGÍSTICA MÚLTIPLA OU MULTIVARIADA 

- Analisar →
Regressão → Logística Binária 

- Selecionar
a variável dependente e as preditoras (independentes).









- Em
“categórico” identificar as variáveis categóricas, conforme descrito no “PASSO
4”.









- Em
“Opções” selecionar os itens do quadro “estatísticas e gráficos” → Continuar →
ok, conforme descrito no “PASSO 4”.



- Determinar
o critério de seleção das variáveis independentes no modelo.



“método” →
selecionar “Forward: condicional” → ok











No quadro
“Variáveis da equação” observar o Fator de Chances (odds ratio) representado por “Exp(B)” e a significância
estatística.











- Os
preditores independentes são aqueles com p &lt; 0,05.





PASSO 6:
AVALIAR A QUALIDADE DO MODELO - teste de
Hosmer e Lemeshow E/OU PSEUDO R2



●Teste de Hosmer
e Lemeshow



- No quadro
“Teste de Hosmer e Lemeshow” avaliar a significância estatística do teste. O
valor de p deve ser ≥ 0,05.&nbsp; 







● Pseudo R2



- No quadro
“Resumo do modelo” verificar o valor do “R quadrado de Nagelkerke”. Quanto mais
próximo de 1, maior a qualidade do modelo.