Foram removidas 871 observações do dataset original, pois continham valores NA nas variáveis de interesse. Restaram 4047 observações. As variáveis de interesse são:
bm <- glm(dec_num ~ attr + sinc + intel + fun + amb + shar,
data = dados,
family = "binomial")
knitr::kable(tidy(bm, conf.int = TRUE, exponentiate = TRUE) %>% select(-statistic, -p.value))
| term | estimate | std.error | conf.low | conf.high |
|---|---|---|---|---|
| (Intercept) | 0.0060703 | 0.2430206 | 0.0037456 | 0.0097122 |
| attr | 1.7549741 | 0.0285115 | 1.6605899 | 1.8570035 |
| sinc | 0.8786726 | 0.0315084 | 0.8259435 | 0.9345585 |
| intel | 1.0069363 | 0.0385361 | 0.9335975 | 1.0858775 |
| fun | 1.2944974 | 0.0307062 | 1.2192032 | 1.3751970 |
| amb | 0.8241830 | 0.0304569 | 0.7761915 | 0.8746469 |
| shar | 1.3814866 | 0.0241885 | 1.3179627 | 1.4490857 |
# m = dados %>%
# data_grid(
# attr = seq_range(attr, 10),
# sinc = 0,
# intel = 10,
# fun = 0,
# amb = 0,
# shar = 0,
# )
#
# mm = augment(bm,
# newdata = m,
# type.predict = "response")
#
# ggplot(mm, aes(x = attr)) +
# geom_line(aes(y = .fitted))
tidy(bm, conf.int = TRUE, exponentiate = TRUE) %>%
filter(term != "(Intercept)") %>%
ggplot(aes(x = term, y = estimate, ymin = conf.low, ymax = conf.high)) +
geom_point() +
geom_linerange() +
coord_flip() +
labs(y = "Estimativa", x = "Termo")
O modelo é do formato: p(match) / p (1 - match) = 0.006 * 1.75^attr * 0.88^sinc * 1.01^intel * 1.29^fun + 0.82^amb + 1.38^shar e explica 26% da variável resposta. As principais conclusões foram:
ser sincero ou ambicioso diminui as chances de match;
ser inteligente tem efeito irrelevante no match;
ser divertido e compartilhar os mesmos interesses aumenta de forma relevante as chances de match;
ser atraente é o fator que mais aumenta as chances de match;