Spatial autoregressive (SAR) models are fit using datasets that contain observations on geographical areas or on any units with a spatial representation. Fit linear models with autoregressive errors and spatial lags of the dependent and independent variables. Specify spatial lags using spatial weighting matrices. Create standard weighting matrices, such as inverse distance or nearest neighbor, or create custom matrices. Fit random- and fixed-effects models for spatial panel data. Explore direct and indirect effects of covariates after fitting models.


SAR MODELS FOR CROSS-SECTIONAL DATA

  • Linear models with autoregressive errors and spatial lags of the dependent and independent variables
  • Generalized method of moments estimator GS2SLS (generalized spatial two-stage least squares)
    • Spatial lags and autoregressive error terms given by one or more spatial weighting matrices
    • Heteroskedastic errors
  • Maximum-likelihood estimator
    • Robust standard errors
    • Constraints
  • Instrumental-variables spatial linear models
  • Moran test of residual correlation

 

SAR MODELS FOR PANEL DATA

  • Fixed-effects maximum-likelihood linear models
  • Random-effects maximum-likelihood linear models
    • Model panel-level effects as normal i.i.d. or with the same autoregressive form as the time-level errors

 

DATA MANAGEMENT FOR SPATIAL DATA

  • Capabilities for
    • Data with shapefiles
    • Data without shapefiles but including location information
    • Data without shapefiles or location information
  • Automatic translation of standard-format shapefiles
  • Set coordinates as
    • Planar
    • Latitude and longitude
  • Calculate distances
  • Automatic balancing of spatial panel data
  • Draw choropleth maps

© Copyright 1996–2024 StataCorp LLC. All rights reserved.

SPATIAL WEIGHTING MATRICES FOR SAR MODELS

  • Create and manage spatial weighting matrices that specify spatial lags
  • Nearest-neighbor weighting matrices
  • Inverse-distance weighting matrices
  • Custom weighting matrices from
    • Stata data
    • Mata programs
    • File import
  • Normalization of weighting matrices
    • Spectral (largest eigenvalue)
    • Min–max normalization
    • Row
  • Manage matrices
    • List
    • Summarize
    • Drop
    • Copy
    • Save and use
    • Add note
  • Import and export weighting matrices from text files
  • Use and save weighting matrices in Stata format

PREDICTIONS

  • Reduced-form mean
  • Direct mean
  • Indirect mean
  • Limited-information mean
  • Full-information mean
  • Linear prediction
  • Residuals
  • Uncorrelated residuals

POSTESTIMATION ANALYSIS

  • Direct and indirect (spillover) effects with standard errors

POSTESTIMATION SELECTOR

  • View and run all postestimation features for your command
  • Automatically updated as estimation commands are run