Any suggestions would be most appreciated.
Here's a rough idea of what I want to do.
Code: Select all
do i=1,50
(1) regress y on x and zHat and error term u
* zHat will not be included in regression (1) the first time it is run.
* Save the coefficients.
set theCoeffs = %beta
* Now run regression (2) which depends on lagged residuals from (1)
(2) regress z on g and uHat{1} and error term e
* Save the fitted values of (2) which will be used in (1) on the next pass
set zHat = fitted values of z from (2)
* Include some criterion for exiting the loop if the coefficients stop changing
end do i