2

I need to use Breusch-Pagan test, to check whether two series are homoscedastic.

First I calculate the residuals of two lists of prices after [...] and then I test residuals for homoscedasticity. My doubt is, does it make sense to regress the residuals with a rep(0, N) line? I thought of it because the residuals should be 0 (to have a perfect fit) so i think it makes sense to regress the residuals with a 0,0,0,0,0 etc etc line, what do you think?

The only problem that if I use bptest(residuals ~ rep(0,500)) I get a NA

rolando2
  • 12,511
Segr
  • 21
  • 4
    The Breusch-Pagan test is clearly described in the Wikipedia article: you regress the squared residuals against the original (independent) variables. What, then, are you trying to ask about rep(0,N)? Because it never makes sense to regress anything against a constant value such as 0 (except as a complicated way to compute an arithmetic mean), I am wondering whether this question correctly communicates what you want to ask. – whuber Oct 07 '11 at 18:38

1 Answers1

1

I don't see any way this makes sense as it stands.

Residuals from a linear regression should already have mean 0, and 500 zeros certainly do, so the regression is left trying to figure out "how many times zero is the best linear predictor of the residuals?".

Anything times zero is zero, so no multiple of 0 could achieve anything at all toward getting us closer to any residual value. Such a predictor can never achieve anything with ordinary regression residuals.

Your regression estimator will be 0/0 ... which is why you're getting NA.

I, too, wonder if you may have mistyped something in your question. If not, it simply makes no sense at all.

To quote Mr Babbage, "I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question"

There's nothing to be gained here, it's not a meaningful activity.

Glen_b
  • 282,281