# Does it make sense to regress the residuals with rep(0, N) vector?

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

-
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 7 '11 at 18:38