Could you please take a look at this and make sure it makes sense/agrees with what we talked about in the meeting on Tuesday?
Thanks,
Victoria
Dataset
To calculate the Bartik weights, I created a dataset of the form:
124 observations (one for each MSA).
130 variables:
rmsa
Dependent variables (2 variables):
For high school-equivalent workers:
resgap2: Difference between the mean wage residuals of HS-equivalent immigrant and native workers in each MSA in 2000.
For college-equivalent workers:
resgap4: Difference between the mean wage residuals of college-equivalent immigrant and native workers in each MSA in 2000.
Instruments (38 variables):
shric1-shric38: This corresponds to one variable for each of the 38 countries. It is the fraction of earlier immigrants from country k who lived in location l in 1980. For example, the variable shric1 takes on 124 distinct values, giving us the share of immigrants from Mexico that lived in each of the top 124 MSAs in 1980.
In order to agree with Card's instrument, we divide the variables by the city population in 2000. So the values of shric1-shric38 for each row are divided by the corresponding MSA's population in 2000.
Regression controls (12 variables):
logsize80: Log city size in 1980
logsize90: Log city size in 1990
coll80: Share of the MSA population with college in 1980
coll90: Share of the MSA population with college in 1990
nres80: Mean wage residuals for natives living in the MSA in 1980
ires80: Mean wage residuals for immigrants living in the MSA in 1980
nres90: Mean wage residuals for natives living in the MSA in 1990
ires90: Mean wage residuals for immigrants living in the MSA in 1990
mfg80: Share of MSA workers in manufacturing in 1980
mfg90: Share of MSA workers in manufacturing in 1990
resgap902: Lagged dependent variable for high school-equivalent workers. Currently not included in the list of controls.
resgap904: Lagged dependent variable for college-equivalent workers. Currently not included in the list of controls.
"Growth rates" (76 variables):
For high school equivalent workers (38 variables):
hs_imm_ic1-hs_imm_ic38: Number of HS-equivalent immigrant workers who arrived in the US between 1990 and 2000. One variable for each country ic1-ic38. This variables are constant across MSAs, so their values are repeated for all of the 124 observations.
For college equivalent workers (38 variables):
coll_imm_ic1-coll_imm_ic38: Number of college-equivalent immigrant workers who arrived in the US between 1990 and 2000. One variable for each country ic1-ic38. This variables are constant across MSAs, so their values are repeated for all of the 124 observations.
Regression weight (1 variable):
count90: MSA population in 1990
Code for weights
I am going to have two scripts, one for the high school-equivalent workers and one for the college-equivalent workers. I am copying below the code for HS-equivalent workers.
set seed 12345
use data/prepared_bartik.dta, clear
local controls logsize80 logsize90 coll80 coll90 ires80 nres80 mfg80 mfg90
local weight count90
local y resgap2
local x relshs
*local z shric*
local ind_stub shric*
local growth_stub hs_imm_ic*
* local time_var year
local cluster_var rmsa
foreach ind_var of varlist `ind_stub'* {
replace `ind_var' = `ind_var' * 100
}
forvalues k = 1(1)38 {
egen agg_sh_ind_`k' = rowtotal(shric`k')
}
bartik_weight, z(`ind_stub'*) weightstub(`growth_stub'*) x(`x') y(`y') controls(`controls') weight_var(`weight')
Hi @econisaac,
Could you please take a look at this and make sure it makes sense/agrees with what we talked about in the meeting on Tuesday?
Thanks, Victoria
Dataset
To calculate the Bartik weights, I created a dataset of the form:
rmsa
resgap2
: Difference between the mean wage residuals of HS-equivalent immigrant and native workers in each MSA in 2000.resgap4
: Difference between the mean wage residuals of college-equivalent immigrant and native workers in each MSA in 2000.shric1
-shric38
: This corresponds to one variable for each of the 38 countries. It is the fraction of earlier immigrants from countryk
who lived in locationl
in 1980. For example, the variableshric1
takes on 124 distinct values, giving us the share of immigrants from Mexico that lived in each of the top 124 MSAs in 1980. In order to agree with Card's instrument, we divide the variables by the city population in 2000. So the values ofshric1
-shric38
for each row are divided by the corresponding MSA's population in 2000.logsize80
: Log city size in 1980logsize90
: Log city size in 1990coll80
: Share of the MSA population with college in 1980coll90
: Share of the MSA population with college in 1990nres80
: Mean wage residuals for natives living in the MSA in 1980ires80
: Mean wage residuals for immigrants living in the MSA in 1980nres90
: Mean wage residuals for natives living in the MSA in 1990ires90
: Mean wage residuals for immigrants living in the MSA in 1990mfg80
: Share of MSA workers in manufacturing in 1980mfg90
: Share of MSA workers in manufacturing in 1990resgap902
: Lagged dependent variable for high school-equivalent workers. Currently not included in the list of controls.resgap904
: Lagged dependent variable for college-equivalent workers. Currently not included in the list of controls.hs_imm_ic1
-hs_imm_ic38
: Number of HS-equivalent immigrant workers who arrived in the US between 1990 and 2000. One variable for each country ic1-ic38. This variables are constant across MSAs, so their values are repeated for all of the 124 observations.coll_imm_ic1
-coll_imm_ic38
: Number of college-equivalent immigrant workers who arrived in the US between 1990 and 2000. One variable for each country ic1-ic38. This variables are constant across MSAs, so their values are repeated for all of the 124 observations.Code for weights
I am going to have two scripts, one for the high school-equivalent workers and one for the college-equivalent workers. I am copying below the code for HS-equivalent workers.