Open vdquadros opened 5 years ago
Hi @econisaac
Please see above and let me know if it makes sense.
Above, I am reporting Table 6 done in Stata using an intermediate dataset constructed in SAS. This table is the most similar to the Table 6 we obtain if we run everything in SAS.
The coefficients for HS-equivalent workers in this table are less similar to Card's than in our previous Table 6 (the one in Issue #9), but the coefficients for College-equivalent workers barely changed. Also notice that the R2 are higher in this table than in our previous table.
After looking at this data a lot, my feeling is that this table is the most consistent with the way Card wrote his paper. I think the differences stem from using a different dataset, especially for 1990. As I mentioned above, 1990 is the only year where our number of immigrants is not exactly the same as Card's.
I will check how our Rotemberg weights and the remaining Bartik tables change if we use the dataset that generated this last Table 6.
I would like to know, however, if there's anything else I should do about Table 6 itself.
Best, Victoria
Hi Victoria,
This is very detailed, precise, and, overall, pretty great!
I think that we should proceed with the version of Table 6 where we use the residuals generated from SAS. I think that you should then push on to re-generating the Rotemberg weights and generating the various other tables and figures that we had discussed.
Let me know if you have any other questions.
Thanks again!
best, isaac
The main directories for this exercise are: 1) Card's original code and lst files: here 2) Our SAS code and lst files: here. Our code is a very slight modification of Card's code to adjust paths and things like that. We run the code using our dataset downloaded from ICPSR instead of Card's original dataset (which we don't have). 3) Our Stata code: here
For replicating table 6, we need data from 1980-2000, but not from 2005/06. The complete list of scripts needed to replicate Table 6 is below.
What we already know that I won't repeat in length:
New developments
The last two columns of Table 3 look different if ran in SAS vs. Stata. In SAS, "PROC GLM" is used to first regress log wage on a bunch of things and get the residual. Then, the variance of the log wage and of the residuals are calculated across MSAs. The original code for 1980 can be found here (starting in line 176). In Stata, instead of using "PROC GLM", I just use "reg". This generates different results.
Note also that this Stata results for the variances look a bit different from the ones I reported in Issue #9. I fixed a couple of things since then and thus the results now are closer to Card's.
If I then export the SAS dataset that generated the variances above and use it for generating Table 6, I get a Table 6 that:
The table 6 we get from both SAS and Stata can be found below. The tables were generated by Stata, but the equivalent results in SAS can be found in this link:
Many data checks using the .lst files
When dealing with SAS, we have two important files: the .sas and the .lst files. The .sas files are the scripts. The .lst files store any results that were printed while running the script. Thus, .lst saves the results from "PROC MEANS", "PROC PRINT", "POROC GLM", etc. Luckily, we have (almost) all of Card's .lst files. Thus, we can compare our results after running each single script by comparing the .lst files.
Take aways
Data checks by yea using the .lst files