Now for some details. First, the research question I am interested in: How does municipal-level political competition affect the funding level of a pension plan run by that municipality?
To simplify the structure of my data is as follows: I have data on a municipal-level measure of political competition and funding level of various pension plans run by these municipalities over time. Each municipality belongs to a county and for a number of reasons, my baseline specification includes county fixed effects.
Thus, this is my (simplified) baseline regression:
Code:
xi: areg meanactfundratio lmeanactfundratio political_competitiveness7 i.period, absorb(county)
Now I want to address the spatial correlation between pension plans. I believe one somewhat unsatisfactory approach of doing that is to cluster standard errors at the county level, which I have done. Thus I have run:
Code:
xi: areg meanactfundratio lmeanactfundratio political_competitiveness7 i.period, absorb(county) cluster(county)
While I am able to run:
Code:
xi: spxtregress meanactfundratio lmeanactfundratio political_competitiveness7 i.period, re errorlag(W)
I am however unable to run:
Code:
xi: spregress meanactfundratio lmeanactfundratio political_competitiveness7 i.period i.county, ml errorlag(W)
(2074 observations)
(2074 observations (places) used)
(weighting matrix defines 1037 places)
estimation sample defines places not in weighting matrix
You must specify if or in to restrict the estimation sample to the places in the weighting matrix or use a different weighting matrix.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(meanactfundratio lmeanactfundratio political_competitiveness7 period) str6 county float municipality_id_num str8 municipality_id 90.79351 38.034103 -.05151126 1996 "01" 1 "010193" 103.80653 90.79351 -.1492273 2006 "01" 1 "010193" 43.48037 21.57011 -.0984934 1996 "01" 2 "010215" 48.72267 43.48037 -.22404087 2006 "01" 2 "010215" 126.14955 346.06445 -.05798948 1996 "01" 3 "010245" 102.04782 126.14955 -.12199911 2006 "01" 3 "010245" 155.18576 358.4015 -.05018273 1996 "01" 4 "010275" 126.8356 155.18576 -.13270164 2006 "01" 4 "010275" 88.97825 83.60065 -.06226122 1996 "01" 5 "010303" 84.76244 88.97825 -.1883972 2006 "01" 5 "010303" 113.68117 100.31748 -.0006153584 1996 "01" 6 "010453" 100.70793 113.68117 -.036280274 2006 "01" 6 "010453" 369.6445 216.80074 -.07789397 1996 "01" 7 "010515" 537.20825 369.6445 -.1784345 2006 "01" 7 "010515" 128.88698 16.939756 -.04999974 1996 "01" 8 "010635" 97.73939 128.88698 -.16537768 2006 "01" 8 "010635" 85.15027 121.13144 -.026643127 1996 "01" 9 "010663" 104.20557 85.15027 -.180543 2006 "01" 9 "010663" 102.5975 146.34023 -.14475524 1996 "01" 10 "010693" 104.22276 102.5975 -.04251865 2006 "01" 10 "010693" end
Thank you for any and all suggestions.
Sutirtha Bagchi
0 Response to Getting spregress to work with panel data when I am not interested in introducing random effects or fixed effects
Post a Comment