On Fri, 22 Jul 2022, Sven Schreiber wrote:
Am 22.07.2022 um 11:50 schrieb Riccardo (Jack) Lucchetti:
> On Thu, 21 Jul 2022, elfsog(a)yahoo.gr wrote:
>
>> The problem is that I won't do simple OLS estimations but 2SLS...
>
> [...]
>
>> I cannot do something similar in Gretl, which has a more powerful
>> routine for 2SLS relative to SPSS....
>
> It wouldn't be difficult to write a Hansl script to achieve this: once
> the cross-product matrices are computed, the rest is simple algebra.
Isn't it even simpler than that? I mean, if you have a known weighting
factor you multiply that with the relevant series to get a weighted
result, and from there you can go on as you usually would. Of course
there's a manual pre-step involved and so it isn't quite as handy as if
there were a specialized setting available, OK. But no need for special
scripting, or am I missing something?
Well, in the context of tsls things may be a little more complicated than
that, especially when it comes to computing valid standard errors. But it
may be conjectured that doing weighted IV "by hand" by using wls instead
of ols in the first and second stage would deliver identical estimates to
a full-fledged weighted IV routine. (As I said, computing valid standard
errors might be a little more intircate).
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------