I have a model produced by a logistic regression which tragically failed Breusch-Pagan test.

> bptest(lm.fit)

    studentized Breusch-Pagan test

data:  lm.fit
BP = 22837.5, df = 2, p-value < 2.2e-16

I am hardly looking for alternatives (the response is zero-inflated). Does the fact that the model is clearly heteroscedastic imply that the model is useless or can I still adopt it with some caution?

  • $\begingroup$ Can you say more about your data & your model? You state that it was "produced by a logistic regression", but your code reads lm.fit, implying a linear model was used. $\endgroup$ – gung - Reinstate Monica Apr 26 '14 at 14:43

A logistic regression shouldn't have constant variance.

As far as I've seen (but please correct me if I am mistaken), Breusch-Pagan is for linear regression, not logistic regression.

It looks to me like ?bptest has the same view.

A version of the test could probably be developed for logistic regression, but it would be testing a different hypothesis than homoskedasticity vs heteroskedasticity (you'd test whether there was deviation from the particular variance assumption in logistic regression).

| cite | improve this answer | |

To answer your question, the model is not totally useless as you will still get unbiased estimates for your linear regression parameters. However, the heteroscedasticity leads to inefficient estimates. In other words, the estimated variance of the estimates is too high and you should be cautious when making inferences from based on the standard errors. I cannot say more without knowing the objective of your estimation.

| cite | improve this answer | |
  • $\begingroup$ In a network I am trying to estimate the probability of seeing a connection (e_weight) between any pair of nodes by controlling for how far apart the the two nodes were created (time_diff) and the interaction between the importance of each node (mult_size). The r code would be glm(as.factor(e_weight)~mult_size+time_diff,data=mydata,family="binomial") $\endgroup$ – Francesco Apr 26 '14 at 6:55
  • $\begingroup$ If you are trying to predict, I would use the model even if there is heteroscedasticity. You can use a holdout sample to see how well your model predicts. By contrast, if you are trying to provide evidence for a theory about how your variables are related, I would be a bit more careful. The standard errors will appear larger than they are. See if you can make the data more homoscedastic with some transformation. In network analysis, you sometimes have some very skewed distributions and a log transformation can help. Good luck. $\endgroup$ – Hernan Apr 26 '14 at 10:41

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.