Note: Apenas 9 de um total de 732 observações foram retiradas do dataset das interconcelhias. Apenas 3 observações de um total de 647 foram retiradas do dataset das intraconcelhias. Um exemplo de uma observação que foi retirado se refere a uma pessoa que diz que não tem carta, mas conduz um automóvel para ir ao trabalho.
dataset <- read_excel("Inter_PD_final.xlsx")
dataset_filtrado <- read_excel("Inter_PD_final_FiltradoObs.xlsx")
dataset <- data.frame(dataset)
dataset_filtrado <- data.frame(dataset_filtrado)
| Name | dataset |
| Number of rows | 5984 |
| Number of columns | 56 |
| _______________________ | |
| Column type frequency: | |
| numeric | 56 |
| ________________________ | |
| Group variables | None |
Variable type: numeric
| skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|
| id_old | 0 | 1 | 1056.62 | 600.87 | 3.0 | 538.00 | 1046.00 | 1547.00 | 2328.00 | ▇▇▇▆▃ |
| id_new | 0 | 1 | 15165.91 | 4947.32 | 10003.0 | 10940.25 | 11758.00 | 20790.25 | 22328.00 | ▇▁▁▁▆ |
| Bloco | 0 | 1 | 8.57 | 4.57 | 1.0 | 5.00 | 8.00 | 13.00 | 16.00 | ▇▇▇▆▇ |
| Jogo | 0 | 1 | 3.04 | 1.44 | 1.0 | 2.00 | 3.00 | 4.00 | 6.00 | ▇▃▃▃▁ |
| CHOICE | 0 | 1 | 2.38 | 1.57 | 1.0 | 1.00 | 2.00 | 4.00 | 6.00 | ▇▂▂▁▁ |
| Estacionamento_1 | 0 | 1 | 2.66 | 2.48 | 0.0 | 0.00 | 2.00 | 6.00 | 6.00 | ▇▇▁▁▇ |
| Portagem_1 | 0 | 1 | 0.92 | 0.83 | 0.0 | 0.00 | 0.70 | 2.00 | 2.00 | ▇▇▁▁▇ |
| Combustivel_1 | 0 | 1 | 2.97 | 1.23 | 1.5 | 1.50 | 3.00 | 4.50 | 4.50 | ▇▁▇▁▇ |
| Tempo_de_viagem_1_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_de_viagem_1_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_de_viagem_1_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_2_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_2_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_2_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_2_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_2_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_2_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_no_transp_2 | 0 | 1 | 34.92 | 8.12 | 25.0 | 25.00 | 35.00 | 45.00 | 45.00 | ▇▁▇▁▇ |
| Custo_Viagem_2 | 0 | 1 | 1.89 | 1.12 | 0.8 | 0.80 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_2 | 0 | 1 | 1.00 | 0.82 | 0.0 | 0.00 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_3_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_3_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_3_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_3_min | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_3_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_3_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_no_transp_3 | 0 | 1 | 29.98 | 4.06 | 25.0 | 25.00 | 30.00 | 35.00 | 35.00 | ▇▁▇▁▇ |
| Custo_Viagem_3 | 0 | 1 | 1.89 | 1.12 | 0.8 | 0.80 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_3 | 0 | 1 | 0.98 | 0.81 | 0.0 | 0.00 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_4_min | 0 | 1 | 0.32 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_4_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_4_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_4_min | 0 | 1 | 0.32 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_4_neu | 0 | 1 | 0.34 | 0.48 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_4_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_no_transp_4 | 0 | 1 | 15.00 | 4.09 | 10.0 | 10.00 | 15.00 | 20.00 | 20.00 | ▇▁▇▁▇ |
| Custo_Viagem_4 | 0 | 1 | 1.89 | 1.13 | 0.8 | 0.80 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_4 | 0 | 1 | 1.01 | 0.82 | 0.0 | 0.00 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_5_min | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_5_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_5_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_5_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_5_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_5_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_no_transp_5 | 0 | 1 | 29.90 | 8.15 | 20.0 | 20.00 | 30.00 | 40.00 | 40.00 | ▇▁▇▁▇ |
| Custo_Viagem_5 | 0 | 1 | 1.88 | 1.13 | 0.8 | 0.80 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_5 | 0 | 1 | 1.99 | 0.81 | 1.0 | 1.00 | 2.00 | 3.00 | 3.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_6_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_6_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_6_min | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_6_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.00 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_no_transp_6 | 0 | 1 | 30.18 | 8.15 | 20.0 | 20.00 | 30.00 | 40.00 | 40.00 | ▇▁▇▁▇ |
| Custo_Viagem_6 | 0 | 1 | 1.89 | 1.12 | 0.8 | 0.80 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_6 | 0 | 1 | 1.00 | 0.82 | 0.0 | 0.00 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
| Name | dataset_filtrado |
| Number of rows | 5939 |
| Number of columns | 56 |
| _______________________ | |
| Column type frequency: | |
| numeric | 56 |
| ________________________ | |
| Group variables | None |
Variable type: numeric
| skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|
| id_old | 0 | 1 | 1057.09 | 600.17 | 3.0 | 539.0 | 1048.00 | 1547.00 | 2328.00 | ▇▇▇▆▃ |
| id_new | 0 | 1 | 15172.26 | 4946.14 | 10003.0 | 10948.0 | 11770.00 | 20797.00 | 22328.00 | ▇▁▁▁▆ |
| Bloco | 0 | 1 | 8.56 | 4.57 | 1.0 | 5.0 | 8.00 | 13.00 | 16.00 | ▇▇▇▆▇ |
| Jogo | 0 | 1 | 3.04 | 1.44 | 1.0 | 2.0 | 3.00 | 4.00 | 6.00 | ▇▃▃▃▁ |
| CHOICE | 0 | 1 | 2.38 | 1.56 | 1.0 | 1.0 | 2.00 | 4.00 | 6.00 | ▇▂▂▁▁ |
| Estacionamento_1 | 0 | 1 | 2.66 | 2.48 | 0.0 | 0.0 | 2.00 | 6.00 | 6.00 | ▇▇▁▁▇ |
| Portagem_1 | 0 | 1 | 0.92 | 0.83 | 0.0 | 0.0 | 0.70 | 2.00 | 2.00 | ▇▇▁▁▇ |
| Combustivel_1 | 0 | 1 | 2.97 | 1.23 | 1.5 | 1.5 | 3.00 | 4.50 | 4.50 | ▇▁▇▁▇ |
| Tempo_de_viagem_1_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_de_viagem_1_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_de_viagem_1_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_2_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_2_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_2_max | 0 | 1 | 0.32 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_2_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_2_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_2_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_no_transp_2 | 0 | 1 | 34.93 | 8.12 | 25.0 | 25.0 | 35.00 | 45.00 | 45.00 | ▇▁▇▁▇ |
| Custo_Viagem_2 | 0 | 1 | 1.89 | 1.12 | 0.8 | 0.8 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_2 | 0 | 1 | 1.00 | 0.82 | 0.0 | 0.0 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_3_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_3_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_3_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_3_min | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_3_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_3_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_no_transp_3 | 0 | 1 | 29.98 | 4.06 | 25.0 | 25.0 | 30.00 | 35.00 | 35.00 | ▇▁▇▁▇ |
| Custo_Viagem_3 | 0 | 1 | 1.89 | 1.12 | 0.8 | 0.8 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_3 | 0 | 1 | 0.98 | 0.82 | 0.0 | 0.0 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_4_min | 0 | 1 | 0.32 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_4_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_4_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_4_min | 0 | 1 | 0.32 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_4_neu | 0 | 1 | 0.34 | 0.48 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_4_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_no_transp_4 | 0 | 1 | 15.00 | 4.09 | 10.0 | 10.0 | 15.00 | 20.00 | 20.00 | ▇▁▇▁▇ |
| Custo_Viagem_4 | 0 | 1 | 1.89 | 1.13 | 0.8 | 0.8 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_4 | 0 | 1 | 1.01 | 0.82 | 0.0 | 0.0 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_5_min | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_5_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_5_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_5_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_5_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_5_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_no_transp_5 | 0 | 1 | 29.89 | 8.15 | 20.0 | 20.0 | 30.00 | 40.00 | 40.00 | ▇▁▇▁▇ |
| Custo_Viagem_5 | 0 | 1 | 1.88 | 1.13 | 0.8 | 0.8 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_5 | 0 | 1 | 1.99 | 0.81 | 1.0 | 1.0 | 2.00 | 3.00 | 3.00 | ▇▁▇▁▇ |
| Tempo_a_paragem_6_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_paragem_6_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_paragem_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_6_min | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_a_espera_6_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▅ |
| Tempo_a_espera_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.00 | 1.00 | ▇▁▁▁▃ |
| Tempo_no_transp_6 | 0 | 1 | 30.18 | 8.15 | 20.0 | 20.0 | 30.00 | 40.00 | 40.00 | ▇▁▇▁▇ |
| Custo_Viagem_6 | 0 | 1 | 1.89 | 1.12 | 0.8 | 0.8 | 1.45 | 3.45 | 3.45 | ▇▇▁▁▇ |
| Transbordos_6 | 0 | 1 | 0.99 | 0.82 | 0.0 | 0.0 | 1.00 | 2.00 | 2.00 | ▇▁▇▁▇ |
Note: Dados sem “missing data”. Algumas variáveis dummy foram consideradas como continua nesta análise. Entretanto isto não tem problema, porque na hora de rodar o modelo, as variáveis serão consideradas com dummy.
dataset_semID <- dataset[,-c(1,2)]
boxplot(dataset_semID)
dataset_filtrado_semID <- dataset_filtrado[,-c(1,2)]
boxplot(dataset_filtrado_semID)
Note: Como era de se esperar, não existem outliers nos dados.
Apenas as correlações estatísticamente significativas aparecem na figura (pvalue < 0,05). Fiz esta filtragem devido ao número alto de variáveis.A tabela antes da figura demonstra a correlação (Freq) entre uma variável (Var1) e outra (Var2).
## Var1 Var2 Freq
## 1595 Tempo_a_paragem_4_neu Tempo_a_paragem_4_max -0.5114916
## 1760 Tempo_a_espera_4_neu Tempo_a_espera_4_max -0.5104808
## 550 Tempo_a_paragem_2_min Tempo_a_paragem_2_neu -0.5093634
## 439 Tempo_de_viagem_1_min Tempo_de_viagem_1_max -0.5074751
## 2035 Tempo_a_paragem_5_min Tempo_a_paragem_5_neu -0.5072542
## 2254 Tempo_a_espera_5_min Tempo_a_espera_5_max -0.5071150
## 715 Tempo_a_espera_2_min Tempo_a_espera_2_neu -0.5068962
## 2750 Tempo_a_espera_6_neu Tempo_a_espera_6_max -0.5057671
## 2584 Tempo_a_paragem_6_min Tempo_a_paragem_6_max -0.5057238
## 1264 Tempo_a_espera_3_min Tempo_a_espera_3_max -0.5049628
## 1265 Tempo_a_espera_3_neu Tempo_a_espera_3_max -0.5045807
## 2530 Tempo_a_paragem_6_min Tempo_a_paragem_6_neu -0.5040039
## 1045 Tempo_a_paragem_3_min Tempo_a_paragem_3_neu -0.5038875
## 2090 Tempo_a_paragem_5_neu Tempo_a_paragem_5_max -0.5024767
## 1705 Tempo_a_espera_4_min Tempo_a_espera_4_neu -0.5012763
## 769 Tempo_a_espera_2_min Tempo_a_espera_2_max -0.5011792
## 2695 Tempo_a_espera_6_min Tempo_a_espera_6_neu -0.5010133
## 1099 Tempo_a_paragem_3_min Tempo_a_paragem_3_max -0.5004787
## 604 Tempo_a_paragem_2_min Tempo_a_paragem_2_max -0.5001933
## 385 Tempo_de_viagem_1_min Tempo_de_viagem_1_neu -0.5000499
## Var1 Var2 Freq
## 1595 Tempo_a_paragem_4_neu Tempo_a_paragem_4_max -0.5123492
## 1760 Tempo_a_espera_4_neu Tempo_a_espera_4_max -0.5107541
## 550 Tempo_a_paragem_2_min Tempo_a_paragem_2_neu -0.5098105
## 2035 Tempo_a_paragem_5_min Tempo_a_paragem_5_neu -0.5078907
## 439 Tempo_de_viagem_1_min Tempo_de_viagem_1_max -0.5077242
## 2254 Tempo_a_espera_5_min Tempo_a_espera_5_max -0.5062131
## 715 Tempo_a_espera_2_min Tempo_a_espera_2_neu -0.5061885
## 2750 Tempo_a_espera_6_neu Tempo_a_espera_6_max -0.5058146
## 2584 Tempo_a_paragem_6_min Tempo_a_paragem_6_max -0.5057770
## 1265 Tempo_a_espera_3_neu Tempo_a_espera_3_max -0.5053742
## 1264 Tempo_a_espera_3_min Tempo_a_espera_3_max -0.5047961
## 1045 Tempo_a_paragem_3_min Tempo_a_paragem_3_neu -0.5035350
## 2530 Tempo_a_paragem_6_min Tempo_a_paragem_6_neu -0.5034683
## 2090 Tempo_a_paragem_5_neu Tempo_a_paragem_5_max -0.5017303
## 769 Tempo_a_espera_2_min Tempo_a_espera_2_max -0.5012020
## 1705 Tempo_a_espera_4_min Tempo_a_espera_4_neu -0.5010920
## 1099 Tempo_a_paragem_3_min Tempo_a_paragem_3_max -0.5008634
## 2695 Tempo_a_espera_6_min Tempo_a_espera_6_neu -0.5006444
## 604 Tempo_a_paragem_2_min Tempo_a_paragem_2_max -0.5005581
dataset_tra <- read_excel("Intra_PD_final.xlsx")
dataset_filtrado_tra <- read_excel("Intra_PD_final_FiltradoObs.xlsx")
dataset_tra <- data.frame(dataset_tra)
dataset_tra_filtrado <- data.frame(dataset_filtrado_tra)
| Name | dataset_tra |
| Number of rows | 4232 |
| Number of columns | 41 |
| _______________________ | |
| Column type frequency: | |
| character | 1 |
| numeric | 40 |
| ________________________ | |
| Group variables | None |
Variable type: character
| skim_variable | n_missing | complete_rate | min | max | empty | n_unique | whitespace |
|---|---|---|---|---|---|---|---|
| Jogo | 0 | 1 | 1 | 1 | 0 | 5 | 0 |
Variable type: numeric
| skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|
| id_old | 0 | 1 | 1081.07 | 647.03 | 3.0 | 567.0 | 1032.00 | 1606.0 | 2331.0 | ▆▇▇▅▅ |
| id_new | 0 | 1 | 16537.12 | 5083.33 | 10008.0 | 11010.0 | 20137.00 | 21169.0 | 22331.0 | ▆▁▁▁▇ |
| Bloco | 0 | 1 | 5.94 | 3.09 | 1.0 | 3.0 | 6.00 | 9.0 | 11.0 | ▇▆▆▅▅ |
| CHOICE | 0 | 1 | 2.99 | 2.61 | 1.0 | 1.0 | 1.00 | 6.0 | 7.0 | ▇▁▁▁▃ |
| Estacionamento_1 | 0 | 1 | 2.03 | 2.17 | 0.0 | 0.0 | 1.00 | 5.0 | 5.0 | ▇▁▁▁▅ |
| Combustível_1 | 0 | 1 | 1.17 | 0.47 | 0.5 | 0.5 | 1.50 | 1.5 | 1.5 | ▅▁▁▁▇ |
| Facilidade_de_estacionar_1_Difícil | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Facilidade_de_estacionar_1_Razoável | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Facilidade_de_estacionar_1_Fácil | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_Viagem_1_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_Viagem_1_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_Viagem_1_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_a_paragem_2_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_2_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_2_max | 0 | 1 | 0.32 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_2_min | 0 | 1 | 0.35 | 0.48 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_espera_2_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_2_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_no_transporte_2 | 0 | 1 | 15.02 | 4.07 | 10.0 | 10.0 | 15.00 | 20.0 | 20.0 | ▇▁▇▁▇ |
| Custo_da_viagem_2 | 0 | 1 | 1.48 | 0.74 | 0.6 | 0.6 | 1.45 | 2.4 | 2.4 | ▇▁▇▁▇ |
| Tempo_a_paragem_6_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_6_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_6_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_espera_6_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_no_transporte_6 | 0 | 1 | 9.94 | 4.11 | 5.0 | 5.0 | 10.00 | 15.0 | 15.0 | ▇▁▇▁▇ |
| Custo_da_viagem_6 | 0 | 1 | 1.48 | 0.74 | 0.6 | 0.6 | 1.45 | 2.4 | 2.4 | ▇▁▇▁▇ |
| Rede_ciclavel_7_Pouco_seguro | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Rede_ciclavel_7_Parte_estrada_ciclovia | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Rede_ciclavel_7_Muito_seguro_ciclovia | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Est_Trabalho_7_Sem_lugar | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Est_Trabalho_7_Via_publica | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Est_Trabalho_7_Local_seguro | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Est_Casa_7_Via_publica | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Est_Casa_7_Acesso_dificil | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Est_Casa_7_Garagem | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_viagem_7_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_viagem_7_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_viagem_7_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Name | dataset_filtrado_tra |
| Number of rows | 4217 |
| Number of columns | 41 |
| _______________________ | |
| Column type frequency: | |
| character | 1 |
| numeric | 40 |
| ________________________ | |
| Group variables | None |
Variable type: character
| skim_variable | n_missing | complete_rate | min | max | empty | n_unique | whitespace |
|---|---|---|---|---|---|---|---|
| Jogo | 0 | 1 | 1 | 1 | 0 | 5 | 0 |
Variable type: numeric
| skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|
| id_old | 0 | 1 | 1082.21 | 645.89 | 3.0 | 571.0 | 1032.00 | 1606.0 | 2331.0 | ▆▇▇▅▅ |
| id_new | 0 | 1 | 16557.66 | 5080.40 | 10008.0 | 11011.0 | 20148.00 | 21173.0 | 22331.0 | ▆▁▁▁▇ |
| Bloco | 0 | 1 | 5.93 | 3.09 | 1.0 | 3.0 | 6.00 | 9.0 | 11.0 | ▇▆▆▅▅ |
| CHOICE | 0 | 1 | 2.99 | 2.61 | 1.0 | 1.0 | 1.00 | 6.0 | 7.0 | ▇▁▁▁▃ |
| Estacionamento_1 | 0 | 1 | 2.04 | 2.17 | 0.0 | 0.0 | 1.00 | 5.0 | 5.0 | ▇▁▁▁▅ |
| Combustível_1 | 0 | 1 | 1.17 | 0.47 | 0.5 | 0.5 | 1.50 | 1.5 | 1.5 | ▅▁▁▁▇ |
| Facilidade_de_estacionar_1_Difícil | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Facilidade_de_estacionar_1_Razoável | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Facilidade_de_estacionar_1_Fácil | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_Viagem_1_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_Viagem_1_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_Viagem_1_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_a_paragem_2_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_2_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_2_max | 0 | 1 | 0.32 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_2_min | 0 | 1 | 0.35 | 0.48 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_espera_2_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_2_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_no_transporte_2 | 0 | 1 | 15.01 | 4.07 | 10.0 | 10.0 | 15.00 | 20.0 | 20.0 | ▇▁▇▁▇ |
| Custo_da_viagem_2 | 0 | 1 | 1.48 | 0.73 | 0.6 | 0.6 | 1.45 | 2.4 | 2.4 | ▇▁▇▁▇ |
| Tempo_a_paragem_6_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_6_neu | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_a_paragem_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_6_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_espera_6_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_espera_6_max | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_no_transporte_6 | 0 | 1 | 9.93 | 4.11 | 5.0 | 5.0 | 10.00 | 15.0 | 15.0 | ▇▁▇▁▇ |
| Custo_da_viagem_6 | 0 | 1 | 1.48 | 0.74 | 0.6 | 0.6 | 1.45 | 2.4 | 2.4 | ▇▁▇▁▇ |
| Rede_ciclavel_7_Pouco_seguro | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Rede_ciclavel_7_Parte_estrada_ciclovia | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Rede_ciclavel_7_Muito_seguro_ciclovia | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Est_Trabalho_7_Sem_lugar | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Est_Trabalho_7_Via_publica | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Est_Trabalho_7_Local_seguro | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Est_Casa_7_Via_publica | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Est_Casa_7_Acesso_dificil | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Est_Casa_7_Garagem | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_viagem_7_min | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
| Tempo_de_viagem_7_neu | 0 | 1 | 0.33 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▃ |
| Tempo_de_viagem_7_max | 0 | 1 | 0.34 | 0.47 | 0.0 | 0.0 | 0.00 | 1.0 | 1.0 | ▇▁▁▁▅ |
Note: Dados sem “missing data”. Algumas variáveis dummy foram consideradas como continua nesta análise. Entretanto isto não tem problema, porque na hora de rodar o modelo, as variáveis serão consideradas como dummy.
dataset_semID_tra <- dataset[,-c(1,2,4)]
boxplot(dataset_semID_tra)
dataset_filtrado_semID_tra <- dataset_filtrado_tra[,-c(1,2,4)]
boxplot(dataset_filtrado_semID_tra)
Note: Como era de se esperar, não existem outliers nos dados.
Apenas as correlações estatísticamente significativas aparecem na figura (pvalue < 0,05). Fiz esta filtragem devido ao número alto de variáveis.A tabela antes da figura demonstra a correlação (Freq) entre uma variável (Var1) e outra (Var2).
## Var1 Var2 Freq
## 1512 Tempo_a_paragem_4_neu Tempo_a_paragem_4_max -0.5114916
## 1674 Tempo_a_espera_4_neu Tempo_a_espera_4_max -0.5104808
## 486 Tempo_a_paragem_2_min Tempo_a_paragem_2_neu -0.5093634
## 377 Tempo_de_viagem_1_min Tempo_de_viagem_1_max -0.5074751
## 1944 Tempo_a_paragem_5_min Tempo_a_paragem_5_neu -0.5072542
## 2159 Tempo_a_espera_5_min Tempo_a_espera_5_max -0.5071150
## 648 Tempo_a_espera_2_min Tempo_a_espera_2_neu -0.5068962
## 2646 Tempo_a_espera_6_neu Tempo_a_espera_6_max -0.5057671
## 2483 Tempo_a_paragem_6_min Tempo_a_paragem_6_max -0.5057238
## 1187 Tempo_a_espera_3_min Tempo_a_espera_3_max -0.5049628
## 1188 Tempo_a_espera_3_neu Tempo_a_espera_3_max -0.5045807
## 2430 Tempo_a_paragem_6_min Tempo_a_paragem_6_neu -0.5040039
## 972 Tempo_a_paragem_3_min Tempo_a_paragem_3_neu -0.5038875
## 1998 Tempo_a_paragem_5_neu Tempo_a_paragem_5_max -0.5024767
## 1620 Tempo_a_espera_4_min Tempo_a_espera_4_neu -0.5012763
## 701 Tempo_a_espera_2_min Tempo_a_espera_2_max -0.5011792
## 2592 Tempo_a_espera_6_min Tempo_a_espera_6_neu -0.5010133
## 1025 Tempo_a_paragem_3_min Tempo_a_paragem_3_max -0.5004787
## 539 Tempo_a_paragem_2_min Tempo_a_paragem_2_max -0.5001933
## 324 Tempo_de_viagem_1_min Tempo_de_viagem_1_neu -0.5000499
## Var1
## 429 Tempo_a_paragem_2_min
## 546 Tempo_de_espera_2_min
## 1442 Tempo_de_viagem_7_min
## 741 Tempo_a_paragem_6_min
## 312 Tempo_Viagem_1_min
## 584 Tempo_de_espera_2_min
## 195 Facilidade_de_estacionar_1_Difícil
## 858 Tempo_de_espera_6_min
## 1325 Est_Casa_7_Via_publica
## 1209 Est_Trabalho_7_Via_publica
## 1091 Rede_ciclavel_7_Pouco_seguro
## 1092 Rede_ciclavel_7_Parte_estrada_ciclovia
## 896 Tempo_de_espera_6_min
## 1170 Est_Trabalho_7_Sem_lugar
## Var2 Freq
## 429 Tempo_a_paragem_2_neu -0.5149989
## 546 Tempo_de_espera_2_neu -0.5088902
## 1442 Tempo_de_viagem_7_max -0.5084947
## 741 Tempo_a_paragem_6_neu -0.5068775
## 312 Tempo_Viagem_1_neu -0.5060668
## 584 Tempo_de_espera_2_max -0.5058815
## 195 Facilidade_de_estacionar_1_Razoável -0.5052631
## 858 Tempo_de_espera_6_neu -0.5033732
## 1325 Est_Casa_7_Garagem -0.5023148
## 1209 Est_Trabalho_7_Local_seguro -0.5023133
## 1091 Rede_ciclavel_7_Muito_seguro_ciclovia -0.5020377
## 1092 Rede_ciclavel_7_Muito_seguro_ciclovia -0.5017692
## 896 Tempo_de_espera_6_max -0.5014905
## 1170 Est_Trabalho_7_Via_publica -0.5001702
Poucas observações foram detectadas como sem lógica ou contradizentes. Tanto para a viagens interconcelhias como intraconcelhias, não houve grande alteração nas correlações e estatíticas descritivas quando retirado observações que não faziam sentido.Portanto, para rodar os modelos de escolha discreta, faz sentido utilizar apenas o banco de dados filtrado para as intra e inter.