I'm sure you could take a whack at the code and remove it, but then you'd have to worry about whether you're messing up something else, at least math/stats-wise if not code-wise.
If you want to break up the run into n segments, I'd add the n regressors. (Sounds like that's what you're doing, though maybe you added n-1 which is OK since that would span the same column space as long as the col of all 1s (mean regressor) is still there.)
Of course that's going to change the beta associated with the mean regressor because the regressors you've added are now confounded with it. If you work out the relevant formulas, though, for a simple representation of the associated betas, it should be fine.
Finally, the models with the original mean regressor and without it (in the presence of hte added ones) are equivalent and are related by a simple transformation, so you can't really gain anything by eliminating the original one (except for perhaps simplicity insofar as there'll be less overparameterization).
|