EconPapers    
Economics at your fingertips  
 

Implementing procedures for spatial panel econometrics in Stata

Gordon Hughes ()

United Kingdom Stata Users' Group Meetings 2011 from Stata Users Group

Abstract: Econometricians have begun to devote more attention to spatial interactions when carrying out applied econometric studies. In part, this is motivated by an explicit focus on spatial interactions in policy formulation or market behavior, but it may also reflect concern about the role of omitted variables that are or may be spatially correlated. The classic models of spatial autocorrelation or spatial error rely upon a predefined matrix of spatial weights W, which may be derived from an explicit model of spatial interactions but which, alternatively, could be viewed as a flexible approximation to an unknown set of spatial links similar to the use of a translog cost function. With spatial panel data, it is possible, in principle, to regard W as potentially estimable, though the number of time periods would have to be large relative to the number of spatial panel units unless severe restrictions are placed upon the structure of the spatial interactions. While the estimation of W may be infeasible for most real data, there is a strong, formal similarity between spatial panel models and nonspatial panel models in which the variance-covariance matrix of panel errors is not diagonal. One important variant of this type of model is the random-coefficient model in which slope coefficients differ across panel units so that interest focuses on the mean slope coefficient across panel units. In certain applications--for example, cross-country (macro-)economic data--the assumption that reaction coefficients are identical across panel units is not intuitively plausible. Instead of just sweeping differences in coefficients into a general error term, the random-coefficient model allows the analyst to focus on the common component of responses to changes in the independent variables while retaining the information about the error structure associated with coefficients that are random across panel units but constant over time for each panel unit. At present, Stata's spatial procedures include a range of user-written routines that are designed to deal with cross-sectional spatial data. The recent release of a set of programs (including spmat, spivreg, and spreg) written by Drukker, Prucha, and Raciborski provides Stata's users with the opportunity to fit a wide range of standard spatial econometric models for cross-sectional data. Extending such procedures to deal with panel data is nontrivial, in part because there are important issues about how panels with incomplete data should be treated. The casewise exclusion of missing data is automatic for cross-sectional data, but omitting a whole panel unit because some of the data in the panel are missing will typically lead to a very large reduction in the size of the working dataset. For example, it is very rare for international datasets on macroeconomic or other data to be complete, so that casewise exclusion of missing data will generate datasets that contain many fewer countries or time periods than might otherwise be usable. The theoretical literature on econometric models for the analysis of spatial panels has flourished in the last decade with notable contributions from LeSage and Pace, Elhorst, and Pfaffermayr, among others. In some cases, authors have made available specific code for the implementation of the techniques that they have developed. However, the programming language of choice for such methods has been MATLAB, which is expensive and has a fairly steep learning curve for nonusers. Many of the procedures assume that there are no missing data and the procedures may not be able to handle large datasets because the model specifications can easily become unmanageable if either N (the number of spatial units) or T (the number of time periods) becomes large. The presentation will cover a set of user-written maximum likelihood procedures for fitting models with a variety of spatial structures including the spatial error model, the spatial Durbin model, the spatial autocorrelation model, and certain combinations of these models--the terminology is attributable to LeSage and Pace (2009). A suite of MATLAB programs to fit these models for both random and fixed effects has been compiled by Elhorst (2010) and provides the basis for the implementation in Stata/Mata. Methods of dealing with missing data, including the implementation of an approach proposed by Pfaffermayr (2009), will be discussed. The problem of missing data is most severe when data on the dependent variable are missing in the spatial autocorrelation model because it means that information on spatial interactions may be greatly reduced by the exclusion of countries or other panel units. In such cases, some form of imputation may be essential, so the presentation will consider alternative methods of imputation. It should be noted that mi does not support panel data procedures in general, and the relatively high cost of fitting spatial panel models means that it may be difficult to combine mi with spatial procedures for practical applications. A second aspect of spatial panel models that will be covered in the presentation concerns the links between such models and random-coefficient models that can be fit using procedures such as xtrc or the user-written procedure xtmg. The classic formulation of random-coefficient models assumes that the variance-covariance model of panel errors is diagonal but heteroskedastic. This is an implausible assumption for most cross-country datasets, so it is important to consider how it may be relaxed, either by allowing for explicit spatial interactions or by using a consistent estimator of the cross-country variance-covariance model. The user-written procedures introduced in the presentation will be illustrated by applications drawn from analyses of demand for infrastructure, health outcomes, and climate for cross-country data covering the developing and developed world plus regions in China.

Date: 2011-09-26
New Economics Papers: this item is included in nep-geo and nep-ure
References: Add references at CitEc
Citations: View citations in EconPapers (2)

Downloads: (external link)
http://repec.org/usug2011/UK11_Hughes.pdf presentation slides (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:usug11:12

Access Statistics for this paper

More papers in United Kingdom Stata Users' Group Meetings 2011 from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2025-03-31
Handle: RePEc:boc:usug11:12