*********************************************************************************************************************** *** U.S. analysis - create estimation data from General Social Survey and data from the Bureau of Economic Analysis *** *********************************************************************************************************************** // create treatment variable use "orig\sainc1_personal_income.dta", clear // calculate inflation-adjusted annual income per capita drop if geoname == "" destring geofips, replace drop if geofips == 0 drop if geofips >= 90000 // compute foreach var of varlist y1929 - y1949{ replace `var' = "" if `var' == "(NA)" destring `var', replace } reshape long y, i(geoname geofips linecode description) j(year) drop description reshape wide y, i(geoname geofips year) j(linecode) ren y1 totinc ren y2 pop ren y3 pcinc merge m:1 year using "orig\cpi-minneapolis.dta" drop if _merge == 2 drop _merge g pcinc_defl = pcinc*100/inflation g totinc_defl = totinc*100/inflation preserve keep geoname year pop save "data\pop.dta", replace restore // keep relevant variables keep year geoname pcinc_defl duplicates drop // calculate real wage growth reshape wide pcinc_defl, i(geoname) j(year) ren pcinc_defl* income* forvalues j = 1930(1)2019{ local i = `j' - 1 g growth`j' = (income`j' - income`i')/income`i' } drop income* reshape long growth, i(geoname) j(year) ren growth income label var income "Annual income pc, inflation adj" // Matches results in Carreri and Teso (-3.5%) sum income if year <= 2008, detail // Aggregation by census division // merge with a file that maps states to census divisions drop if income ==. replace geoname = "Alaska" if geoname == "Alaska *" replace geoname = "Hawaii" if geoname == "Hawaii *" rename geoname state merge m:1 state using "orig\geonames1.dta" keep if _merge == 3 drop _merge // merge to population data (from Bureau of Economic Analysis) ren state geoname merge 1:1 geoname year using "data\pop.dta" keep if _merge == 3 drop _merge // population by division and year bysort year division: egen div_pop = total(pop) // total income, by division g state_income = pop*income bysort year division: egen div_income = total(pop*income) // average income, by division g avg_div_income = div_income/div_pop // keep one observation by division and year keep division reg16 year avg_div_income duplicates drop ren avg_div_income income // check if in line with paper -- -2.9% instead of -3.4% sum income if year <= 2010, detail g recession = income <= -0.034 * alternative definitions g recession1 = income < 0 g recession2 = income <= -0.025 g recession3 = income <= -0.1 drop income save "data\recession.dta", replace // perhaps the authors use a different (older?) dataset or a different measure of income. // the datasets are available at https://apps.bea.gov/regional/docs/DataAvailability.cfm // wide format to merge to GSS data use "data\recession.dta", clear drop recession1 recession2 recession3 reshape wide recession, i(reg16) j(year) g recession1929 = recession1930 order recession1929 save "data\recession_wide.dta", replace erase "data\pop.dta" // GSS data use "orig\gss7221_r1a.dta", clear drop if year == 2021 /* X_i is a vector of individual characteristics, including gender and race, as well as measures of income, education, marital status, and labour market status */ global xvars "id year age sex race income rincome educ marital wrkstat" /* We also include dummies for both the region where the person is living and the region where the person was at 16 */ global mobility "region reg16 mobile16" /* In some specifications, we also include information on family background of the individual at 16 years, and religious denomination. In particular, we control for both the level of education of the father and family income at 16 years, the religion in which the person was raised, and the religion at time of interview. */ global backgr "paeduc incom16 relig denom other relig16 denom16" /* All our regressions also include interactions of region-at-16 dummies with linear age trends to help rule out the possibility that results are driven by region-specific cohort effects. */ /* Outcomes */ global opinions "helppoor natfare natfarey natfarez getahead" * natfarez: caring for the poor, natefare: welfare; should most likely be natfarey. global politics "polviews polviewy polviewx partyid" * most relevant seems polviews *The third political measure, voting Democrat, is based on whether the respondent voted *for a Democratic presidential candidate in the most recent election. We eliminated those *observations where individuals either did not vote or voted for an independent candidate. * -- need to code. *keep $xvars $mobility $backgr $opinions $politics // outcomes voting democrat global presvote "pres68 pres72 pres76 pres80 pres84 pres88 pres92 pres96 pres00 pres04 pres08 pres12 pres16" foreach var of varlist $presvote{ g dem_`var' = 1 if `var' == 1 replace dem_`var' = 0 if `var' == 2 } egen democrat_test = rowtotal(dem_pres68 - dem_pres16) replace democrat_test =. if dem_pres68 == . & dem_pres72 ==. & dem_pres76 ==. & dem_pres80 ==. & dem_pres84 ==. & dem_pres88 ==. & dem_pres92 ==. & dem_pres96 ==. & dem_pres00 ==. & dem_pres04 ==. & dem_pres08 ==. & dem_pres12 ==. & dem_pres16 ==. drop democrat_test g democrat = . replace democrat = dem_pres68 if year == 1972 replace democrat = dem_pres72 if year >= 1973 & year <= 1976 replace democrat = dem_pres76 if year >= 1977 & year <= 1980 replace democrat = dem_pres80 if year >= 1981 & year <= 1984 replace democrat = dem_pres84 if year >= 1985 & year <= 1988 replace democrat = dem_pres88 if year >= 1989 & year <= 1992 replace democrat = dem_pres92 if year >= 1993 & year <= 1996 replace democrat = dem_pres96 if year >= 1997 & year <= 2000 replace democrat = dem_pres00 if year >= 2001 & year <= 2004 replace democrat = dem_pres04 if year >= 2005 & year <= 2008 replace democrat = dem_pres08 if year >= 2009 & year <= 2012 replace democrat = dem_pres12 if year >= 2013 & year <= 2016 replace democrat = dem_pres16 if year >= 2017 & year <= 2018 *keep if year >= 1972 & year <= 2010 keep if year >= 1972 & year !=. drop if reg16 ==. drop if reg16 == 0 // also has a variable cohort that is simply defined as year - age g byear = cohort drop if cohort == 9999 drop if cohort ==. // political views foreach var of varlist polviews partyid getahead natfarey helppoor{ replace `var' =. if `var' == .d | `var' == .i | `var' == .n } // age - age of individuals > 89 not clear *replace age =. if age == 89 replace age =. if age == .d replace age =. if age == .n // male g male = sex == 1 // black g black = race == 2 // unemployed g unem = wrkstat == 4 replace unem = . if wrkstat == .n // father's education replace paeduc = . if paeduc == .n | paeduc == .d | paeduc == .i // income at 16 - measured on a scale of 1-5 replace incom16 =. if incom16 == .a | incom16 == .i // total family income - measured on a scale of 1-10 replace income =. if income == .a | income == .i // religious denomination - today drop relig1 - relig5 tabulate relig, g(relig) ren relig1 protestant ren relig2 catholic ren relig3 jewish ren relig10 christian replace christian = 1 if relig11 == 1 ren relig5 rel_other foreach var of varlist relig6 relig7 relig8 relig9 relig12 relig13{ replace rel_other = 1 if `var' == 1 } drop relig4 relig6 relig7 relig8 relig9 relig11 relig12 relig13 // religious denomination - at 16 tabulate relig16, g(relig) ren relig1 protestant16 ren relig2 catholic16 ren relig3 jewish16 ren relig10 christian16 replace christian16 = 1 if relig11 == 1 ren relig5 rel_other16 foreach var of varlist relig6 relig7 relig8 relig9 relig12 relig13{ replace rel_other16 = 1 if `var' == 1 } drop relig4 relig6 relig7 relig8 relig9 relig11 relig12 relig13 // merge with recession data: defined as -0.034 percent merge m:1 reg16 using "data\recession_wide.dta" keep if _merge == 3 drop _merge forvalues i = 1911(1)1994{ local j = `i' + 18 local k = `i' + 25 egen exp`i' = rowtotal(recession`j' - recession`k') replace exp`i' = 1 if exp`i' > 1 & exp`i' !=. } * censoring for the later cohorts! forvalues i = 1995(1)2001{ local j = `i' + 18 egen exp`i' = rowtotal(recession`j' - recession2019) replace exp`i' = 1 if exp`i' > 1 & exp`i' !=. } g shock =. forvalues i = 1911(1)2001{ replace shock = exp`i' if byear == `i' } drop exp* recession* ren shock recession // Those with birthyear prior to 1911? have all experienced a recession if they are born in 1904 or after replace recession = 1 if byear >= 1904 & byear <= 1911 drop if byear < 1904 | byear >= 2001 // married g married = marital == 1 replace married =. if marital ==. | marital == .n // variables are coded such that smaller values indicate less support for redistribution // rename variables to be in line with replication dofile. *Codebook: Washington should do everything possible to improve the standard of living of all poor Americans; they are at Point 1 on this card. Other people *think it is not the government's responsibility, and that each person should take care of himself; they are at Point 5. (In the paper this question seems to be asked on the reverse scale). * government action is low value -- need to recode ren year yearint g helppoor2 = 5 if helppoor == 1 replace helppoor2 = 4 if helppoor == 2 replace helppoor2 = 3 if helppoor == 3 replace helppoor2 = 2 if helppoor == 4 replace helppoor2 = 1 if helppoor == 5 g miss_helppoor2 = helppoor2 ==. bysort yearint: egen min_helpoor2 = min(miss_helppoor2) // higher number indicates too little assistance to the poor. * natfarey: 1 = too little; 3 = too much. * there is a variable natfare, which means something else - welfare rather than caring for the poor g welfare = 1 if natfarey == 3 replace welfare = 2 if natfarey == 2 replace welfare = 3 if natfarey == 1 g miss = welfare ==. bysort yearint: egen min_welfare = min(miss) drop miss // work-luck * remove other from the list replace getahead = . if getahead == 4 g miss = getahead ==. bysort yearint: egen min_getahead = min(miss) drop miss // partyid * remover other from the list * we coded the question such that a higher number corresponds to extremely liberal * g part = 6 - partyid * replace part = . if partyid == 7 g partyidnew = partyid - 6 replace partyidnew =. if partyidnew == 1 g temp = abs(partyidnew) drop partyidnew ren temp partyidnew g miss = partyidnew ==. bysort yearint: egen min_partyidnew = min(miss) drop miss // political views - polviews g polviews2 = polviews - 8 g temp = abs(polviews2) drop polviews2 ren temp polviews2 g miss = polviews2 ==. bysort yearint: egen min_polviews2 = min(miss) drop miss // voting democrat ren democrat presidential2 g miss = presidential2 ==. bysort yearint: egen min_presidential2 = min(miss) drop miss // rename ren recession shock ren region regionint ren reg16 region // female g female = sex == 2 // sample g newsample = yearint >= 2012 drop if (yearint <= 2010 & cohort > 1992) // interactions region interview year egen regionXyearint = group(region yearint) tabulate region, g(region) forvalues i = 1(1)9{ g reg`i'Xage = region`i'*age } keep shock $outcomes age educ married female male income black unem region regionint reg1Xage - reg9Xage byear yearint paeduc incom16 protestant16 catholic16 christian16 jewish16 rel_other16 protestant catholic christian jewish rel_other regionXyearint newsample order shock $outcomes age educ married female male income black unem region regionint reg1Xage - reg9Xage byear yearint paeduc incom16 protestant16 catholic16 christian16 jewish16 rel_other16 protestant catholic christian jewish rel_other regionXyearint newsample save "data\gss_estimation.dta", replace /* End of file */