clear use national7 sort year qtr gen time=_n tsset time line nyse time line cpi time line pers_income time gen nasdaq_1=(nasdaq-nasdaq[_n-1])/nasdaq[_n-1] gen employment_1=(employment-employment[_n-1])/employment[_n-1] gen cpi_1=(cpi-cpi[_n-1])/cpi[_n-1] reg nasdaq_1 employment_1 cpi_1 bond10 estat durbinalt reg nasdaq employment cpi bond10 predict xb line xb nasdaq time scatter xb nasdaq gen nasdaq_log=log(nasdaq) reg nasdaq_log employment cpi bond10 drop xb predict xb scatter xb nasdaq_log line xb nasdaq_log time estat durbinalt ivregress 2sls nasdaq (cpi=cpi_1) employment drop xb predict xb line xb nasdaq time ivregress 2sls nasdaq cpi (L.nasdaq=L.cpi) employment drop xb predict xb line xb nasdaq time reg nasdaq L.nasdaq predict xb1 line xb xb1 nasdaq time scatter xb xb1