1
$\begingroup$

I'm relatively a newbie in R, and I've been trying to make a silly example of logistic regression to predict, according to Age and Sex whether someone dies of corona or not. I'm from Colombia, so my data is from here. The thing is, when I check the model, I find a super-duper over dispersion when comparing deviance, pearson statistics and residual degrees of fredom:

> c(deviance(muertecovid), sum(resid(muertecovid, type = "pearson")^2) ,df.residual(muertecovid))`

[1] 889.5579 1305.8099 176.0000

I made two models, one with binomial distribution (using logit, the canonical link function), an another with the quasibinomial one. From both, I get the same above results. The link for my data in this :

https://docs.google.com/spreadsheets/d/1CDiBclH6I1UZFSZR1BwS9E1qpUXdPbxseepgUkmKyxw/edit?usp=sharing

This are the models:

muertecovid = glm(Proporcion_m ~ Edad * Sexo, family = binomial, weights = Total, data = FinalCovid)
muertecovid_quasi = glm(Proporcion_m ~ Edad * Sexo, family = quasibinomial, weights = Total, data = FinalCovid)

I made a plot of qresiduals vs fitted values: enter image description here

Please help me wit this, and If you need anything from my code tell me. This might be a silly thing, but you know, we learn from mistakes :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.