* * Example 9.9 * Nonlinear instrumental variables * page 183 * open data tablef5-1[1].txt calendar(q) 1950 data(format=prn,org=columns) 1950:1 2000:4 year qtr realgdp realcons realinvs realgovt realdpi $ cpi_u m1 tbilrate unemp pop infl realint * nonlin a b g linreg realcons # constant realdpi compute a=%beta(1),b=%beta(2),g=1 * frml cfrml realcons = a+b*realdpi**g * * Set the instrument list. In addition to the variables listed, the CONSTANT is * almost always included as an instrument. * instruments constant realcons{1} realdpi{1 2} * * The NLLS uses the option INSTRUMENT to change to non-linear IV from non-linear * least squares * nlls(frml=cfrml,inst) realcons 1950:3 * * * Least squares estimated over the same sample as was used in IV. * nlls(frml=cfrml) realcons 1950:3 *