* Estimating Klein's Model I using several techniques * * Keywords: * regression, 2sls, system, 3sls, ols, gmm, economy, model * * Description: * We illustrate how to estimate Klein's Model I (model of the economy * as a whole) using limited and full information estimates * * Author(s): * Noel Roy * Skif Pankov * * Source: * William H. Greene, Econometric Analysis - 7th Edition * Pearson International Edition, Chapter 10, Example 10.6 (page 372) * time 1920 1 sample 1920.0 1941.0 * Reading the datafile and retrieving variables' names read (TableF10-3.shd) / names * Generating the variables for the model genr plag=lag(p) genr xlag=lag(x) genr w=wp+wg genr a=year-1931 sample 1921.0 1941.0 * Single equation: limited information estimation methods (first column of * Table 10.5): * * Ordinary Least Squares * * Estimating each of the three equations in Klein's model seearately ols c p plag w ols i p plag k1 ols wp x xlag a * Two-Stage Least Squares 2sls c p plag w (wg g t plag k1 xlag a) / dn 2sls i p plag k1 (wg g t plag k1 xlag a) / dn 2sls wp x xlag a (wg g t plag k1 xlag a) / dn * Saving the sample size as n gen1 n = \$n * GMM estimation (H2SLS) nl 1 g t a wg plag k1 xlag /ncoef=4 gmm=hetcov eq c=betap*p+betaplag*plag+betaw*w+constant end * nl 1 g t a wg plag k1 xlag /ncoef=4 gmm=hetcov eq i=betap*p+betaplag*plag+betak*k1+constant end * nl 1 g t a wg plag k1 xlag /ncoef=4 gmm=hetcov eq wp=betax*x+betaxlag*xlag+betaa*a+constant end * Limited information Maximum Likelihood (LIML) genr one=1 * Defining all exogenous variables in the system exog:one g t a wg plag k1 xlag * Defining all endogenous variables in the system endog:c p w * Defining the right-hand side exogenous variables for the first * (consumption) equation: rhsexog:one plag * Defining all right-hand side endogenous variables for the c equation rhsendog:p w * Defining the left-hand side endogenous variable lhs:c * Runnig the proc (procedure) using the exec command. exec liml * Doing the same for the other two equations: gen1 \$n=n exog:one g t a wg plag k1 xlag endog:i p rhsexog:one plag k1 rhsendog:p lhs:i exec liml * gen1 \$n=n * exog:one g t a wg plag k1 xlag endog:wp x rhsexog:one xlag a rhsendog:x lhs:wp exec liml * System Methods of Estimation (second column of Table 10.5) * * Three-stage least squares (3SLS) via system command system 3 wg g t a plag k1 xlag / dn ols c p plag w ols i p plag k1 ols wp x xlag a * the I3SLS results can be obtained by iterating the 3SLS estimation. system 3 wg g t a plag k1 xlag / dn iter=20 ols c p plag w ols i p plag k1 ols wp x xlag a * GMM estimation (H3SLS) * * There are insufficient observations to fit the system as a whole. Greene * estimates the system in two pairs, (c,i) and (c, wp), and reports the first * of these for the c equation * * First pair: nl 2 g t a wg plag k1 xlag / ncoef=8 gmm=hetcov eq c=betap1*p+betaplg1*plag+betaw1*w+con1 eq i=betap2*p+betaplg2*plag+betak2*k1+con2 end * Second pair: nl 2 g t a wg plag k1 xlag / ncoef=8 gmm=hetcov eq c=betap1*p+betaplg1*plag+betaw1*w+con1 eq wp=betax3*x+betaxlg3*xlag+betaa3*a+con3 end stop