On Wed, Mar 15, 2023 at 4:11 AM Riccardo (Jack) Lucchetti
<p002264(a)staff.univpm.it> wrote:
I just tried running tsls with the --liml option on a just-identified
equation. As is well-known, this should return the same results as
ordinary 2sls. For some reason, I'm getting an error: I suspect this is
linked to the fact that there's no constant term in the model. I don't
have time to debug this myself today, but maybe somebody else can.
Here's s simple script exposing the problem:
<hansl>
nulldata 100
series w = uniform()
series x = normal()
series y = normal()
tsls y const x ; const w
tsls y const x ; const w --liml # this works
tsls y x ; w
tsls y x ; w --liml # this doesn't
</hansl>
That's now fixed in git. We just had to recognize the case where an
ancillary regression had no regressors, and therefore we should
transcribe the dependent variable as the residual instead of calling
OLS.
Allin