Sorry in my previous post I confused the endogenous and Exogenus variables

You are stating that X = { Ψ1,Ψ2,  Z1,Z2, Z3, Z4} are uncorrelated with e.  Out of all possible linear combinations of the variables in X that can be used as an instrument for  X1, and X2 You should choose the linear combinations that are most highly correlated with the endogenous variables.  Thus you should use the entire set for each variable.  See for example section 5.2.3 - Asymptotic Efficiency of Two-Stage Least Squares in Wooldridge (2012), Econometric Analysis of Cross Section and Panel Data, MIT.   I would presume that this correct approach is taken by Gretl.


On Thu, 10 Aug 2023 at 19:21, Alecos Papadopoulos <papadopalex@aueb.gr> wrote:
I believe this should be scripted, it is not standard two-stage least
squares.

Regress X1 on Z1 and Z2 and obtain the fitted values, say X1_f

Regress X2 on Z3 and Z4 and obtain the fitted values, X2_f

Regress Y on a constant and  X1_f, X2_f, Ψ1,Ψ2.

Alecos Papadopoulos PhD
Affiliate Researcher
Dpt of Economics, Athens University of Economics and Business
Foundation for Economic and Industrial Research (IOBE)
web: alecospapadopoulos.wordpress.com/
ORCID:0000-0003-2441-4550

On 10/8/2023 20:21, elfsog@yahoo.gr wrote:
> Consider the following 2SLS model:
>
> Y= b0 +b1X1+b2X2+θ1Ψ1+θ2Ψ2+e
> Where:
> Y  represents the dependent variable,
> X1, X2  denote the endogenous variables,
> Ψ1,Ψ2  represent the exogenous variables.
>
> To address endogeneity in the model, a set of four instruments, is introduced. Two instruments (Z1 and Z2) are employed to instrument for X1, while two other instruments (Z3 and Z4) are used to instrument for X2.
> My question is: How Gretl understand which instrument stands for which endogenous variable?
> _______________________________________________
> Gretl-users mailing list -- gretl-users@gretlml.univpm.it
> To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
> Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/