-
Notifications
You must be signed in to change notification settings - Fork 3
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
Regressions #4
Comments
Hi Victoria, If you are already doing things within eclass x xclass then it is not possible to control for eclass x xclass cell (since each regression only has one of the eclass xclass cells). So you need to drop the eclass and xclass references from the right hand side. Also, the reason the R2 are lower in these regressions than I expected is that there is substantial systematic variation in earnings that is explained by education. Then within education bin the regression explains less of the variance in earnings than a Mincerian regression across the whole population. isaac |
Hi Isaac, That makes sense. Just for reference, the SAS code is this
But maybe it deals differently with the regressor if we are already "filtering" the data before. Thanks |
Hi Victoria, Oh, the class statement in SAS is just declaring that these are factor variables. So its not doing a regression by group. So the equivalent in Stata would be to just do: reg logwage2 exp exp2 exp3 educ eclass#xclass inschool advanced ft lowhrs hisp_ed hisp_coll black_ed black_coll asian_ed asian_coll nonmover#eclass rczone0 [fweight=wt] Also think that you want eclass##xclass and nonmover##eclass, so that you also include main effects of the categories. isaac |
reg logwage2 exp exp2 exp3 educ eclass#xclass inschool advanced ft lowhrs hisp_ed hisp_coll black_ed black_coll asian_ed asian_coll nonmover#eclass rczone0 [fweight=wt] ====> R-squared = 0.2516 |
Great. That seems about right. |
The full SAS script for table 6 can be found here. The regression code starts around line 470. The full Stata script for table 6 can be found here. The regression code starts around line 510. OLS without IVSAS code
Stata code
Output
OLS with IVSAS code
Stata code
2SLSSAS Code
Stata Code
Output
|
As discussed in the meeting yesterday, all of the regressions in the comment above are groundless since I was running them on way more observations than I should (due to multiple observations per CZ in the merged files). After our discussion in #6, I changed the way some of the datasets were collapsed so that the CZs uniquely identify the observations. I ran the regressions again on the top 100 CZs. The results are below.
|
Looks promising. Are you sure that your dependent variable is defined correctly? (immigrants - native wages, i believe, rather than vice versa). This would account for the sign flip. Also, can you create tables that report the N, just to make it easy to catch things as before. Thanks! |
Hi @econisaac , Now that we have Tables 1-3 up and running (as per our conversation on issue #5 and in our meeting earlier today), I spent the last few hours writing the code for Table 6 using the MSAs instead of the Commuting Zones. However, the coefficients are still positive, so overestimating the wages and not dealing properly with missing values was not the only problem with the code. Just giving you this update to let you know I did some more work on this but it will require more scrutiny before we get approximate results. Just so you know, here's the current output
|
Thanks. Can you add the N to the table? |
Hi Isaac, As we talked about it before, N for the table above was 124 (the top 124 MSAs in 2000). I am going to close this issue as we are done with the Card replication for now. To recap: In this issue we were still using data downloaded from IPUMS instead of using the Census data directly from ICPSR. As we discovered, IPUMS and ICPSR have different MSAs for the 1980/1990/2000 censuses, so the mapping of MSAs and PUMAs that Card wrote for his paper (since he used ICPSR data) was not working for the IPUMS dataset we had when doing the exercises above. After switching from IPUMS to ICPSR, we could match Tables 2-3 exactly and get closer with Table 6, as per issue #9 Best, |
Just want to let you know that I don’t have the regressions yet because there’s something strange in the regressions to get the residuals:
If I do:
then the display window says:
But if I tab those variables, I get:
So I don't know what's going on, and the residuals are very low (like .1, and not .3)
The text was updated successfully, but these errors were encountered: