Spatial Errors in Count Data Regressions

The "xtpsse" command runs a conditional fixed-effects Poisson panel regression, computes standard errors using sandwich and spatial formulas, and tests for time-invariant spatial dependence according to the paper by M. Bertanha and P. Moser.

STATA - automatic installation

  1. type "ssc describe xtpsse" in STATA for a description of the package
  2. type "ssc install xtpsse" for automatic installation
  3. type "help xtpsse" for help

STATA - manual installation

  1. download and unzip the file "stata_xtpsse.zip" : xtpsse.ado and xtpsse.sthlp
  2. copy the contents of the unzipped folder to your personal-ado directory. To find out the location of such directory, type "sysdir" in STATA and look for "personal":
    • MAC users: typically ~/Documents/Stata/ado or ~/Library/Application Support/Stata/ado depending on the version of STATA
    • Windows users: typically C:\Program Files\Stata16\ado or C:\ado\personal depending on the version of STATA
  3. after installing the files, type "help xtpsse" for help

MATLAB

  1. download and unzip the file "matlab_xtpsse.zip" : xtpsse.m
  2. the MATLAB function contains commented text that explains how to use the function