Hello!
I am a student of a Master in Economics and I am new here but I hope that you can help me with one problem that I have.

I want to run a Barro regression based on Barro(1997) and De Gregorio and Lee (2004). The dependent variable is the economic growth for a period of time and many regressors are endogenous, that is why it is necessary to use instrumental variables. I have panel data with 150 countries and 4 different periods of time. So, following Barro, I should use 3 stage-stage least squares with 4 equations: each equation has as a dependent variable the economic growth of a different period of time. And, since the regressors of each equation are endogenous, Barro uses as instrumental variables the lags of the regressors. The periods of my data are 1975-85, 1985-95, 1995-05, and 2005-15. Therefore, for the equation for the period 1975-1985 I should use data of the regressors from the period 1965-75 as instrumental variables of the right-hand side variables and so on. Nonetheless, I don't know how to do it. I checked the command reg3, but I don't know how to adapt it to my problem with panel data. I would also want to have fixed effects in my model by country and I have no idea if reg3 has an option that allows that. Besides, since I will estimate four different equations, I would get different coefficients for the different time periods; however, in his paper, Barro shows estimated coefficients for all the periods and that confuses me.

So, I want to ask if anyone knows how to run a Barro regression with these characteristics. I thank you in advance for your time, and if you could help me, I would really appreciate it!