Bronwyn H. Hall March 1993 Documentation for GMMPANEL Example. This example comprises 6 TSP runs, plus 3 TSP input files which are used by these runs. All of the runs have been tested on TSP 4.2B on a Compaq 386/25 computer. All of the runs use the same sample dataset, which is included with the examples in compressed form due to its size. Before running any of these examples, give the command USBAL at the DOS prompt, which creates USBAL.DAT. Then USBAL.EXE may be deleted. The sample dataset consists of data on 495 US manufacturing firms for 10 years (1979-1988). The data is sorted with one record per firm-year, first by firms, and then by year within a firm. This enables it to be read either as a pooled time series-cross section with one year per observation, or as a panel with all years together (see the Panel Data chapter in the TSP User's Manual for a discussion of how to read panel data). The file contains data on sales, labor, capital, R&D, etc. for each of the firms, but these examples only use deflated sales, labor, and capital in a very simple constant-returns-to-scale Cobb-Douglas production function estimation. This example is not intended to be realistic, or a reasonable model of firm behavior; it is solely for illustrative purposes. The examples typically only use the last 3 or 6 years of the data. A description of each example follows: USBALFE reads the data as a pooled TS-CS and estimates the standard panel data models with and without lagged X's. There are tests for the constancy of the parameters across firms, and correlated effects. This run also shows how to create and store variables which are constant across time, and how to remove time means from all the variables. USBALPI performs basic PI matrix estimation of a simple fixed effects model with a single x and time-varying coefficients on the firm effect. This example is discussed in Chamberlain, Journal of Econometrics (1982), and also in the Panel Data chapter in the Handbook of Econometrics (North-Holland). USBALGMM estimates the same models as USBALPI using the GMM technique popularized by Hansen (Econometrica 1982). Like the PI matrix method, these estimates are asymptotically efficient even if the errors are heteroskedastic. USBALPIM uses the PI matrix methodology to estimate a model with measurement errors, as an example. This may not be the easiest way to estimate such a model - the example is included as an illustration. The estimated variances of the measurement errors in the case here are negative (insignificantly different from zero), so the estimates do not compare well to those in the next run. USBALME uses GMM to estimate with serially uncorrelated measurement error in the X's. The model is the same as for USBALPIM, but it is easier to set up, and the estimates differ in some cases, probably because of the variance problem mentioned above. The methodology here is from Griliches and Hausman, Journal of Econometrics (1986). USBALGM4 uses GMM to test for strong and various kinds of weak exogeneity of the X's in the model given in the earlier runs. It illustrates how to use the MASK= option in GMM to exclude some instruments from some equations. The supporting input files for these jobs are the following: RDUSBAL reads the data as a panel; it is used by all of the runs except USBALFE. It also constructs the dependent and independent variables and removes their year means (equivalent to including time dummies in a linear model). FITEST calculates a goodness-of-fit statistic after estimation of a PI matrix model, and returns the chi-squared value and its degrees of freedom, so that these can be used in further testing. This PROC also displays the covariance matrix of the residuals computed at the estimated parameter values. GMMCHISQ calculates the chi-squared test of the overidentifying restrictions after a GMM estimation, and returns it along with the degrees of freedom, so these can be used in further testing (of one set of restrictions which are nested within another). It also displays the covariance matrix of the residuals at the estimated parameter values.