2
$\begingroup$

I'm using bptest function of lmtest package to use Breusch-Pagan test.

I get a strange result, doing the follow:

> m <- lm(prices[,1]~prices[,2]+0)
> bptest(formula(mod))

    studentized Breusch-Pagan test

data:  formula(mod) 
BP = 0.458, df = 0, p-value < 2.2e-16

> m <- lm(prices[,1]~prices[,2])
> bptest(formula(m))

    studentized Breusch-Pagan test

data:  formula(m) 
BP = 0.0503, df = 1, p-value = 0.8225

as you can see if I set the intercept to zero (+ 0) i get a very low p-value, then if I do the test again WITH the intercept I get a good p-value.

Setting the intercept to zero also returns df = 0 so, something went wrong.

Could someone explain me the reason?

Thank you!

$\endgroup$

1 Answer 1

7
$\begingroup$

The Breusch-Pagan test regresses the square of the residual from your regression on your predictors. The square of the residual cannot have mean 0 and thus it requires an intercept in this regression in order to achieve unbiased results.

When your predictors don't include an intercept, an intercept is not included in the canned version of the BP test that you are running. As a result, you get biased coefficients and biased test statistics.

If you want to force your model to have a 0 intercept (generally not a good idea, but...), you can do a BP test by hand by getting the residuals from your model, squaring them, and regressing them on an intercept term and your predictors. You can do a Wald ($\chi^2$) test of the significance of the coefficients on your predictors to get the official BP test statistic, but the reported F statistic and its p-value that come standard in the output of the residual-squared ("auxiliary") regression are close approximations to the official/standard versions.

$\endgroup$
2
  • $\begingroup$ Thank you Charlie, only a doubt, what do you mean with "and regressing them on an intercept term and your predictors" ? thanks $\endgroup$
    – Dail
    Commented Sep 13, 2011 at 6:39
  • $\begingroup$ When I say "predictors," I mean the independent variables in your main regression (the one that you care about). $\endgroup$
    – Charlie
    Commented Sep 13, 2011 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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