** Chapter 12.7 ** for W.H. Greene, Econometric Analysis 6th ed. ***************** * (c) Noel Roy 2003, 2008 * * NONLINEAR INSTRUMENTAL VARIABLES ESTIMATION * *=============================================================================== * * Example 12.6 (p. 183) Instrumental Variables Estimates of the Consumption * Function. * * READ (TableF5-1.prn) Year qtr GDP C Inv G Y CPI M1 r / SKIPLINES=1 * * Calculate the instrumental variables. * GENR CLAG = LAG(C) GENR YLAG = LAG(Y) GENR YLAG2 = LAG(Y,2) * * Drop the first two observations * TIME 1950.1 4 SAMPLE 1950.3 2000.4 * * Estimate the non-linear least squares model, saving the coefficients * in the vector B. * NL 1 / NCOEF=3 ITER=200 COEF=B EQ C=ALPHA+BETA*Y**GAMMA END * * Now estimate the instrumental variables model. The exogenous variables * are listed in the NL command using the format * NL neq exog / NCOEF= options. * While NLS converges from the default starting values, * non-linear IV fails to improve on its first iteration at these starting * values, so we use the NLS estimates as starting values for the nonlinear * IV estimates, using the START= option. * NL 1 CLAG YLAG YLAG2 / NCOEF=3 START=B EQ C=ALPHA+BETA*Y**GAMMA END * STOP * *=============================================================================== * * Updated October 21, 2008