Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

averages chart: DID regression results may be incorrect #416

Closed
lanselin opened this issue May 3, 2016 · 6 comments
Closed

averages chart: DID regression results may be incorrect #416

lanselin opened this issue May 3, 2016 · 6 comments

Comments

@lanselin
Copy link
Collaborator

lanselin commented May 3, 2016

after exporting the dummy variables and running the DID regression "by hand", the results are different. the intercept is different, but the slope coefficient of the dummy is correct, although with the wrong sign.
for example comparing HR60 and HR70, which sets the time dummy to 1 for 70, it is clear that the mean for 70 is greater than the mean for 60, yet the DID coefficient of the time dummy is negative.

screen shot 2016-05-03 at 12 53 47 pm

screen shot 2016-05-03 at 12 57 16 pm

screen shot 2016-05-03 at 12 57 54 pm

@lanselin
Copy link
Collaborator Author

lanselin commented May 3, 2016

note how the intercept in the DID regression is the average in year 70, whereas it should be the average in year 60, as in the regular regression output. it seems that maybe the dummies are switched around in the DID regression, i.e., year 60 = 1 and year 70 = 0?

@jkoschinsky
Copy link
Collaborator

When I checked this, it was using t1 = 1960 = 0 and t2=1970 = 1 -- did you
specify it like this in the averages chart or the other way around?
Xun was just saying the code might not have updated.

On 3 May 2016 at 13:17, Luc Anselin notifications@github.com wrote:

note how the intercept in the DID regression is the average in year 70,
whereas it should be the average in year 60, as in the regular regression
output. it seems that maybe the dummies are switched around in the DID
regression, i.e., year 60 = 1 and year 70 = 0?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#416 (comment)


Julia Koschinsky, Ph.D.
Research Director
Associate Research Professor
Arizona State University
School of Geographical Sciences and Urban Planning
GeoDa Center for Geospatial Analysis and Computation
julia.koschinsky@asu.edu

http://geodacenter.asu.edu
http://www.facebook.com/geodacenter
http://twitter.com/GeoDaCenter

@lanselin
Copy link
Collaborator Author

lanselin commented May 3, 2016

see screen shot above, period 1 is 60 and period 2 is 70

@lanselin
Copy link
Collaborator Author

lanselin commented May 4, 2016

note, it seems to be with the time dummy, see results below for south selected and comparison between 60 and 70, both the time and interact coefficient are negative, whereas they should be positive (higher rates in south and in 70)

screen shot 2016-05-03 at 7 28 19 pm

screen shot 2016-05-03 at 7 34 33 pm

screen shot 2016-05-03 at 7 28 12 pm

@lanselin
Copy link
Collaborator Author

lanselin commented May 4, 2016

sorry, here is the correct screen shot for the dummy variable regression

screen shot 2016-05-03 at 7 32 15 pm

@lixun910 lixun910 added this to the 1.8 milestone May 4, 2016
@lixun910 lixun910 self-assigned this May 4, 2016
@lixun910 lixun910 mentioned this issue May 4, 2016
@jkoschinsky
Copy link
Collaborator

Verified in GeoDa 1.8.6 (OSX Yosemite, 10.10.5).
nat.shp using same specification as above

The results now match in all cases:

screen shot 2016-05-18 at 9 49 54 pm

screen shot 2016-05-18 at 9 53 36 pm

screen shot 2016-05-18 at 9 57 54 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants