this is my first topic in Statalist. However, I have been using it as reader throughout the last 1-2 years and it has always helped me alot, so a general thanks to everyone!
Here is my question: Is there a spatial regression model for panel data that works with a binary dependent variable?
I have created an artificial grid net for a specific country. My panel dataset (2004-2019) consists of 4.416 cell years. I am interested in whether changes in population density are related to violent conflict. Since several measures indicate the existence of Spatial Auto Correlation, I want to run spatial regression models rather than not including WxY into the regression. While looking for a model, I was reading the Stata spatial autoregressive models reference manual (https://www.stata.com/manuals/sp.pdf) where it says that "Datasets contain at a minimum a continuous outcome variable [...]" (Manual, 5). I wanted to run two regressions, one with my dummy conflict variable and one with my continous conflict variable. Now, to me it appears that Spatial Panel Regression is mostly for continous variables, is that true?
I have not found much information regarding the selection of spatial models at all.
Dependent variables:
sumconflict (amount of conflicts in a cell per year)
conflict_dummy (0 no conflict 1 at least one conflict)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double gid int year byte(sumconflict conflict_dummy) float(ttime_mean popd) byte excluded double _ID 135732 2004 0 0 907.9863 68.387314 1 135732 135732 2005 0 0 907.9863 72.25968 1 135732 135732 2006 0 0 907.9863 73.41225 1 135732 135732 2007 0 0 907.9863 69.58721 1 135732 135732 2008 0 0 907.9863 74.76343 0 135732 135732 2009 0 0 907.9863 79.55742 0 135732 135732 2010 0 0 907.9863 76.8337 0 135732 135732 2011 0 0 907.9863 85.13601 0 135732 135732 2012 0 0 907.9863 87.23365 0 135732 135732 2013 0 0 907.9863 89.18589 0 135732 135732 2014 0 0 907.9863 91.60899 . 135732 135732 2015 0 0 907.9863 106.7828 . 135732 135732 2016 0 0 907.9863 108.58791 . 135732 135732 2017 0 0 907.9863 105.73356 . 135732 135732 2018 0 0 907.9863 109.4948 . 135732 135732 2019 2 1 907.9863 116.57528 . 135732 135733 2004 0 0 923.2635 84.51994 1 135733 135733 2005 1 1 923.2635 86.62513 1 135733 135733 2006 0 0 923.2635 91.15457 1 135733 135733 2007 0 0 923.2635 87.64269 1 135733 135733 2008 0 0 923.2635 91.08348 0 135733 135733 2009 1 1 923.2635 94.86053 0 135733 135733 2010 0 0 923.2635 97.45685 0 135733 135733 2011 0 0 923.2635 101.14142 0 135733 135733 2012 0 0 923.2635 108.7501 0 135733 135733 2013 2 1 923.2635 112.10914 0 135733 135733 2014 0 0 923.2635 119.4397 . 135733 135733 2015 1 1 923.2635 129.12605 . 135733 135733 2016 0 0 923.2635 136.11842 . 135733 135733 2017 0 0 923.2635 139.63719 . 135733 135733 2018 2 1 923.2635 143.26768 . 135733 135733 2019 1 1 923.2635 145.26973 . 135733 135734 2004 1 1 758.0011 173.39325 1 135734 135734 2005 0 0 758.0011 173.6193 1 135734 135734 2006 0 0 758.0011 186.25314 1 135734 135734 2007 0 0 758.0011 191.2999 1 135734 135734 2008 2 1 758.0011 176.4213 0 135734 135734 2009 0 0 758.0011 181.021 0 135734 135734 2010 0 0 758.0011 199.8898 0 135734 135734 2011 0 0 758.0011 209.20265 0 135734 135734 2012 0 0 758.0011 221.16185 0 135734 135734 2013 0 0 758.0011 228.7141 0 135734 135734 2014 0 0 758.0011 237.82196 . 135734 135734 2015 0 0 758.0011 234.76636 . 135734 135734 2016 0 0 758.0011 243.8495 . 135734 135734 2017 0 0 758.0011 255.1242 . 135734 135734 2018 0 0 758.0011 258.0424 . 135734 135734 2019 1 1 758.0011 253.5568 . 135734 136451 2004 0 0 697.6842 150.1506 1 136451 136451 2005 0 0 697.6842 156.79945 1 136451 136451 2006 0 0 697.6842 157.73026 1 136451 136451 2007 0 0 697.6842 171.83656 1 136451 136451 2008 0 0 697.6842 163.15063 0 136451 136451 2009 0 0 697.6842 171.12045 0 136451 136451 2010 0 0 697.6842 177.78214 0 136451 136451 2011 0 0 697.6842 187.9707 0 136451 136451 2012 0 0 697.6842 195.00113 0 136451 136451 2013 0 0 697.6842 208.7737 0 136451 136451 2014 0 0 697.6842 198.0281 . 136451 136451 2015 0 0 697.6842 202.61552 . 136451 136451 2016 0 0 697.6842 211.0389 . 136451 136451 2017 1 1 697.6842 211.1622 . 136451 136451 2018 1 1 697.6842 219.50172 . 136451 136451 2019 0 0 697.6842 215.3898 . 136451 136452 2004 0 0 924.1018 95.67027 1 136452 136452 2005 1 1 924.1018 99.37617 1 136452 136452 2006 1 1 924.1018 100.88332 1 136452 136452 2007 0 0 924.1018 102.85384 1 136452 136452 2008 1 1 924.1018 106.59133 0 136452 136452 2009 0 0 924.1018 112.33856 0 136452 136452 2010 0 0 924.1018 116.47848 0 136452 136452 2011 0 0 924.1018 121.70628 0 136452 136452 2012 0 0 924.1018 122.18845 0 136452 136452 2013 0 0 924.1018 120.75687 0 136452 136452 2014 2 1 924.1018 122.29737 . 136452 136452 2015 1 1 924.1018 133.0313 . 136452 136452 2016 0 0 924.1018 134.71364 . 136452 136452 2017 0 0 924.1018 135.59761 . 136452 136452 2018 0 0 924.1018 139.57538 . 136452 136452 2019 1 1 924.1018 151.63979 . 136452 136453 2004 0 0 607.8061 265.3798 1 136453 136453 2005 2 1 607.8061 271.5488 1 136453 136453 2006 1 1 607.8061 282.21277 1 136453 136453 2007 2 1 607.8061 292.5856 1 136453 136453 2008 3 1 607.8061 304.66647 0 136453 136453 2009 4 1 607.8061 311.215 0 136453 136453 2010 1 1 607.8061 321.79785 0 136453 136453 2011 0 0 607.8061 329.783 0 136453 136453 2012 0 0 607.8061 335.1554 0 136453 136453 2013 5 1 607.8061 350.1456 0 136453 136453 2014 7 1 607.8061 361.531 . 136453 136453 2015 6 1 607.8061 363.4155 . 136453 136453 2016 3 1 607.8061 378.2019 . 136453 136453 2017 6 1 607.8061 395.1161 . 136453 136453 2018 0 0 607.8061 407.6138 . 136453 136453 2019 12 1 607.8061 414.1178 . 136453 137171 2004 0 0 669.3231 109.2089 1 137171 137171 2005 0 0 669.3231 113.38412 1 137171 137171 2006 0 0 669.3231 123.85465 1 137171 137171 2007 0 0 669.3231 131.08997 1 137171 end
I use Stata 15.0.
Greetings Anton von Poblozki
0 Response to Is there a model for Spatial Panel Regression with a binary/dummy dependent variable?
Post a Comment