3
$\begingroup$

I am calibrating a logistic regression for a survey data which comes from a binary stated choice experiment. The stated choice experiment was an unlabeled one, which means that all the variables describing the two alternatives are generic (time and cost, basically), and, most importantly, there should be no alternative specific constant in the model specification, since the alternatives names (A or B) don't have any meaning.

So, I am using GLM in R to calibrate the model, having included -1 in the terms (response ~ terms) to force the model to be without the intercept. Then I use the deviance and the null.deviance reported by the GLM object to calculate the pseudo R2 (1 - deviance/null.deviance).

I noticed that the model without intercept was resulting in a much higher $R^2$ than the same model with the intercept. This seems to happen because the null.deviance reported by GLM is different in the model without intercept.

So I was wondering:

1- How does GLM calculate the null deviance in the model without intercept? I mean, what is the "null model" in this case, since it doesn't seem to be the model with only a constant term?

2- Is it right to calculate the $R^2$ using the null.deviance reported by the GLM object in this case or should I fit a model with only a constant term in another GLM object, get its deviance and use it as the null deviance to be compared to the deviance of the model I am calibrating?

Since now, thank you very much to anyone who can help my with this doubt!

$\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.