* Instrumental Variables Estimates of the Consumption Function * * Keywords: * regression, 2sls, nonlinear, consumption, function, iv * * Description: * We illustrate how to estimate a non-linear Consumption Function Model * with and without instruments * * Author(s): * Noel Roy * Skif Pankov * * Source: * William H. Greene, Econometric Analysis - 7th Edition * Pearson International Edition, Chapter 8, Example 8.10 (page 288) * * Reading the datafile and naming the variables, specifying to ignore the * first line of the file read (TableF5-2.shd) year qtr gdp c inv g y cpi m1 r / skiplines=1 * Generating the instrumental variables genr clag = lag(c) genr ylag = lag(y) genr ylag2 = lag(y,2) * Dropping the first two observations time 1950.1 4 sample 1950.3 2000.4 * Estimating the non-linear least squares model of c on y, specifying to save the * coefficients in the vector b and to carry out 200 iterations of the estimation * algorithm nl 1 / ncoef=3 iter=200 coef=b eq c=alpha+beta*y**gamma end * Estimating the instrumental variables model. The exogenous variables are * listed in the nl command; we also use the estimated coefficients from the * previous model as the starting point nl 1 clag ylag ylag2 / ncoef=3 start=b eq c=alpha+beta*y**gamma end stop