On Fri, 12 Jul 2019, Sven Schreiber wrote:
Am 12.07.2019 um 20:05 schrieb Allin Cottrell:
> On Fri, 12 Jul 2019, Sven Schreiber wrote:
>> OK, so it's not a pure within transformation. But still: If the dep var
>> is constant and non-zero, we set all other regressor coeffs to zero
>> (except the constant term). Fine. But if the dep var is all zeros, one
>> could also set all regressor coeffs to zero, including the constant,
>> instead of throwing an error. What makes the former case that much
>> different from the latter? (The estimated residuals vanish in both
>> cases.)
>
> True. But if a user runs a regular regression in which the dependent
> variable is all zeros it's surely a safe bet that he or she has made a
> mistake. Nothing informative can come out of it other than that conveyed
> by gretl's "all zeros" error message.
Right. The point is more pragmatic in a programming context, as opposed
to interactive use: We came across it with the wooldridge_test_serial
package. It's just a matter of how to handle the strange corner case. As
things stand, gretl throws an error which interrupts everything. So the
authors would have to use 'catch' to continue gracefully after that error.
Since wooldridge_test_serial consists of a single, quite simple
function, it seems that it could be turned into a built-in test if
we think that's worthwhile.
Allin