Banco de dados

Informações sobre o banco de dados:

  • Dados referentes aos números de internações na Unidade de Tratamento Itensivo - UTI por Covid - 19 no estado da Paraíba.
  • Possui registros de 2387 pacientes.
  • Possui 19 variáveis, sendo 1 a variável dependente.

Análise Descritiva

Verificação de Valores Faltantes

Análise por variável

Variáveis com valores faltantes.
Variavel Missing Existing Prop_miss Prop_exis
PUERPERA 215 2172 9.01 90.99
CARDIOPATI 97 2290 4.06 95.94
HEMATOLOGI 197 2190 8.25 91.75
SIND_DOWN 194 2193 8.13 91.87
HEPATICA 201 2186 8.42 91.58
ASMA 193 2194 8.09 91.91
DIABETES 121 2266 5.07 94.93
NEUROLOGIC 190 2197 7.96 92.04
PNEUMOPATI 192 2195 8.04 91.96
IMUNODEPRE 204 2183 8.55 91.45
RENAL 199 2188 8.34 91.66
OBESIDADE 203 2184 8.50 91.50
OUT_MORBI 122 2265 5.11 94.89

Análise por Paciente

    listando todos os pacientes que apresentaram valores “missing” em pelo menos um variável:

Apresentação de 20 pacientes de um total de 371.
n_paciente sexo idade Q_variaveis
10 F 50 1
20 M 90 12
40 M 93 11
47 M 63 1
53 M 71 1
56 M 67 2
68 F 55 2
83 M 50 1
88 F 92 1
101 M 75 1
104 F 55 12
139 M 22 1
162 M 83 1
176 F 61 1
201 M 64 2
203 M 83 2
219 F 76 12
242 F 88 1
258 F 75 1
276 M 62 12

Por Variável

QUantidade de pacientes por variável e sua categoria
Variavel Categoria Frequencia Percent
sexo F 1084 45.41
sexo M 1303 54.59
trimestre Q3 1387 58.11
trimestre Q4 1000 41.89
semestre 2 2387 100.00
FATOR_RISC anao 472 19.77
FATOR_RISC sim 1915 80.23
PUERPERA anao 2162 90.57
PUERPERA sim 10 0.42
CARDIOPATI anao 1315 55.09
CARDIOPATI sim 975 40.85
HEMATOLOGI anao 2171 90.95
HEMATOLOGI sim 19 0.80
SIND_DOWN anao 2172 90.99
SIND_DOWN sim 21 0.88
HEPATICA anao 2157 90.36
HEPATICA sim 29 1.21
ASMA anao 2149 90.03
ASMA sim 45 1.89
DIABETES anao 1453 60.87
DIABETES sim 813 34.06
NEUROLOGIC anao 2034 85.21
NEUROLOGIC sim 163 6.83
PNEUMOPATI anao 2091 87.60
PNEUMOPATI sim 104 4.36
IMUNODEPRE anao 2109 88.35
IMUNODEPRE sim 74 3.10
RENAL anao 2041 85.50
RENAL sim 147 6.16
OBESIDADE anao 1972 82.61
OBESIDADE sim 212 8.88
OUT_MORBI anao 1109 46.46
OUT_MORBI sim 1156 48.43
EVOLUCAO 0 733 30.71
EVOLUCAO 1 1654 69.29

Histograma

Analise dos Pacientes por sexo

Regressão Logística

Modelo Inicial

## 
## Call:
## glm(formula = factor(EVOLUCAO) ~ . - semestre, family = binomial(link = "logit"), 
##     data = dados)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2682  -1.0918   0.6320   0.8242   1.9672  
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   -1.377513   0.211766  -6.505 7.78e-11 ***
## sexoM          0.018734   0.104733   0.179  0.85803    
## idade          0.034441   0.002935  11.735  < 2e-16 ***
## trimestreQ4   -0.523527   0.105596  -4.958 7.13e-07 ***
## FATOR_RISCsim  0.485626   0.175383   2.769  0.00562 ** 
## PUERPERAsim   -0.497798   0.716382  -0.695  0.48713    
## CARDIOPATIsim -0.363295   0.125571  -2.893  0.00381 ** 
## HEMATOLOGIsim  0.210337   0.602683   0.349  0.72709    
## SIND_DOWNsim  -0.123319   0.527201  -0.234  0.81505    
## HEPATICAsim    0.465119   0.526446   0.884  0.37696    
## ASMAsim        0.303306   0.395458   0.767  0.44310    
## DIABETESsim   -0.152809   0.123486  -1.237  0.21592    
## NEUROLOGICsim -0.261552   0.212357  -1.232  0.21808    
## PNEUMOPATIsim -0.369237   0.248720  -1.485  0.13766    
## IMUNODEPREsim  0.063816   0.289836   0.220  0.82573    
## RENALsim       0.539884   0.250486   2.155  0.03114 *  
## OBESIDADEsim   0.042508   0.184197   0.231  0.81749    
## OUT_MORBIsim   0.182081   0.123883   1.470  0.14162    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 2456.5  on 2015  degrees of freedom
## Residual deviance: 2240.1  on 1998  degrees of freedom
##   (371 observations deleted due to missingness)
## AIC: 2276.1
## 
## Number of Fisher Scoring iterations: 4

Modelo Ajustado p < 0.20

## 
## Call:
## glm(formula = factor(EVOLUCAO) ~ idade + trimestre + FATOR_RISC + 
##     CARDIOPATI + PNEUMOPATI + RENAL + RENAL + OUT_MORBI, family = binomial(link = "logit"), 
##     data = dados)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2724  -1.0977   0.6388   0.8233   1.9569  
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   -1.339169   0.192590  -6.953 3.56e-12 ***
## idade          0.033919   0.002805  12.092  < 2e-16 ***
## trimestreQ4   -0.517848   0.102243  -5.065 4.09e-07 ***
## FATOR_RISCsim  0.443149   0.155457   2.851  0.00436 ** 
## CARDIOPATIsim -0.366534   0.120638  -3.038  0.00238 ** 
## PNEUMOPATIsim -0.338375   0.241346  -1.402  0.16091    
## RENALsim       0.457318   0.231470   1.976  0.04819 *  
## OUT_MORBIsim   0.142990   0.120128   1.190  0.23392    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 2560.9  on 2102  degrees of freedom
## Residual deviance: 2343.9  on 2095  degrees of freedom
##   (284 observations deleted due to missingness)
## AIC: 2359.9
## 
## Number of Fisher Scoring iterations: 4

Envelope de simulação

## Binomial model 
## Simulation 1 out of 99 
## Simulation 2 out of 99 
## Simulation 3 out of 99 
## Simulation 4 out of 99 
## Simulation 5 out of 99 
## Simulation 6 out of 99 
## Simulation 7 out of 99 
## Simulation 8 out of 99 
## Simulation 9 out of 99 
## Simulation 10 out of 99 
## Simulation 11 out of 99 
## Simulation 12 out of 99 
## Simulation 13 out of 99 
## Simulation 14 out of 99 
## Simulation 15 out of 99 
## Simulation 16 out of 99 
## Simulation 17 out of 99 
## Simulation 18 out of 99 
## Simulation 19 out of 99 
## Simulation 20 out of 99 
## Simulation 21 out of 99 
## Simulation 22 out of 99 
## Simulation 23 out of 99 
## Simulation 24 out of 99 
## Simulation 25 out of 99 
## Simulation 26 out of 99 
## Simulation 27 out of 99 
## Simulation 28 out of 99 
## Simulation 29 out of 99 
## Simulation 30 out of 99 
## Simulation 31 out of 99 
## Simulation 32 out of 99 
## Simulation 33 out of 99 
## Simulation 34 out of 99 
## Simulation 35 out of 99 
## Simulation 36 out of 99 
## Simulation 37 out of 99 
## Simulation 38 out of 99 
## Simulation 39 out of 99 
## Simulation 40 out of 99 
## Simulation 41 out of 99 
## Simulation 42 out of 99 
## Simulation 43 out of 99 
## Simulation 44 out of 99 
## Simulation 45 out of 99 
## Simulation 46 out of 99 
## Simulation 47 out of 99 
## Simulation 48 out of 99 
## Simulation 49 out of 99 
## Simulation 50 out of 99 
## Simulation 51 out of 99 
## Simulation 52 out of 99 
## Simulation 53 out of 99 
## Simulation 54 out of 99 
## Simulation 55 out of 99 
## Simulation 56 out of 99 
## Simulation 57 out of 99 
## Simulation 58 out of 99 
## Simulation 59 out of 99 
## Simulation 60 out of 99 
## Simulation 61 out of 99 
## Simulation 62 out of 99 
## Simulation 63 out of 99 
## Simulation 64 out of 99 
## Simulation 65 out of 99 
## Simulation 66 out of 99 
## Simulation 67 out of 99 
## Simulation 68 out of 99 
## Simulation 69 out of 99 
## Simulation 70 out of 99 
## Simulation 71 out of 99 
## Simulation 72 out of 99 
## Simulation 73 out of 99 
## Simulation 74 out of 99 
## Simulation 75 out of 99 
## Simulation 76 out of 99 
## Simulation 77 out of 99 
## Simulation 78 out of 99 
## Simulation 79 out of 99 
## Simulation 80 out of 99 
## Simulation 81 out of 99 
## Simulation 82 out of 99 
## Simulation 83 out of 99 
## Simulation 84 out of 99 
## Simulation 85 out of 99 
## Simulation 86 out of 99 
## Simulation 87 out of 99 
## Simulation 88 out of 99 
## Simulation 89 out of 99 
## Simulation 90 out of 99 
## Simulation 91 out of 99 
## Simulation 92 out of 99 
## Simulation 93 out of 99 
## Simulation 94 out of 99 
## Simulation 95 out of 99 
## Simulation 96 out of 99 
## Simulation 97 out of 99 
## Simulation 98 out of 99 
## Simulation 99 out of 99

ODDS Ratio

dados$sexo=as.factor(dados$sexo)
dados$trimestre=as.factor(dados$trimestre)
dados$semestre=as.factor(dados$semestre)
dados$FATOR_RISC=as.factor(dados$FATOR_RISC)
dados$PUERPERA=as.factor(dados$PUERPERA)
dados$CARDIOPATI=as.factor(dados$CARDIOPATI)
dados$HEMATOLOGI=as.factor(dados$HEMATOLOGI)
dados$SIND_DOWN=as.factor(dados$SIND_DOWN)
dados$HEPATICA=as.factor(dados$HEPATICA)
dados$ASMA=as.factor(dados$ASMA)
dados$DIABETES=as.factor(dados$DIABETES)
dados$NEUROLOGIC=as.factor(dados$NEUROLOGIC)
dados$PNEUMOPATI=as.factor(dados$PNEUMOPATI)
dados$IMUNODEPRE=as.factor(dados$IMUNODEPRE)
dados$RENAL=as.factor(dados$RENAL)
dados$OBESIDADE=as.factor(dados$OBESIDADE)
dados$OUT_MORBI=as.factor(dados$OUT_MORBI)
dados$EVOLUCAO=as.factor(dados$EVOLUCAO)


OR <- glm(EVOLUCAO~idade+trimestre+FATOR_RISC+CARDIOPATI+PNEUMOPATI+RENAL+RENAL+OUT_MORBI,
          family=binomial, data=dados)


logistic.display(OR)
## 
## Logistic regression predicting EVOLUCAO : 1 vs 0 
##  
##                         crude OR(95%CI)   adj. OR(95%CI)    P(Wald's test)
## idade (cont. var.)      1.03 (1.03,1.04)  1.03 (1.03,1.04)  < 0.001       
##                                                                           
## trimestre: Q4 vs Q3     0.66 (0.55,0.8)   0.6 (0.49,0.73)   < 0.001       
##                                                                           
## FATOR_RISC: sim vs anao 1.78 (1.44,2.21)  1.56 (1.15,2.11)  0.004         
##                                                                           
## CARDIOPATI: sim vs anao 1.17 (0.96,1.41)  0.69 (0.55,0.88)  0.002         
##                                                                           
## PNEUMOPATI: sim vs anao 0.93 (0.6,1.46)   0.71 (0.44,1.14)  0.161         
##                                                                           
## RENAL: sim vs anao      1.7 (1.1,2.62)    1.58 (1,2.49)     0.048         
##                                                                           
## OUT_MORBI: sim vs anao  1.56 (1.29,1.88)  1.15 (0.91,1.46)  0.234         
##                                                                           
##                         P(LR-test)
## idade (cont. var.)      < 0.001   
##                                   
## trimestre: Q4 vs Q3     < 0.001   
##                                   
## FATOR_RISC: sim vs anao 0.004     
##                                   
## CARDIOPATI: sim vs anao 0.002     
##                                   
## PNEUMOPATI: sim vs anao 0.168     
##                                   
## RENAL: sim vs anao      0.041     
##                                   
## OUT_MORBI: sim vs anao  0.235     
##                                   
## Log-likelihood = -1171.9462
## No. of observations = 2103
## AIC value = 2359.8925