* Using Stata MP 12.1 clear set matsize 2000 * Set working directory cd "C:\Users\jmarshall\Dropbox\Globalization and Turnout\Replication Materials" use "Spending.dta", clear * Need to install: estout; xtlsdvc; xtserial *********************************************** PRELIMINARY WORK ******************************************* ****** Preparation of data xtset cowcode year g lagdeficit = L1.deficit *** Abbreviations global controls "deindust govparty deppop lagdeficit pr unionlevel unexpgrowthpc autotrans autocons" global controlsben "deindust govparty deppop lagdeficit pr unionlevel unexpgrowthpc autotrans" global trends "syear2-syear920sq" *** Create ownership scale using factor analysis conditional on country effects xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b ****** Diagnostics *** Baseline model (few bootstrapped iterations for speed at this stage) xtlsdvc govspend $controls, initial(ab) bias(3) vcov(500) *** Testing for heteroskedasticity quietly xtgls govspend $controls, igls panels(heteroskedastic) quietly estimates store hetero quietly xtgls govspend $controls quietly local df = e(N_g) - 1 lrtest hetero . , df(`df') quietly xtgls $controls i.cowcode, igls panels(heteroskedastic) quietly estimates store hetero quietly xtgls $controls $trends quietly local df = e(N_g) - 1 lrtest hetero . , df(`df') quietly xtgls $controls $trends, igls panels(heteroskedastic) quietly estimates store hetero quietly xtgls $controls $trends quietly local df = e(N_g) - 1 lrtest hetero . , df(`df') quietly xtgls $controls i.cowcode $trends, igls panels(heteroskedastic) quietly estimates store hetero quietly xtgls $controls $trends quietly local df = e(N_g) - 1 lrtest hetero . , df(`df') *** Test for first-order serial correlation xtserial govspend $controls xi: xtserial govspend $controls i.cowcode xtserial govspend $controls $trends xi: xtserial govspend $controls i.cowcode $trends *** Hausman test of random v. fixed effects quietly xtreg govspend $controls $trends, fe quietly estimates store fixed quietly xtreg govspend $controls $trends, re hausman fixed ., sigmamore *** Identify the risk of spurious correlation by examining the hypothesis that all panels are stationary (only Fisher test allows for unbalanced panels with missing data) xtunitroot fisher govspend, pp lag(1) demean *********************************************** NON_IMPUTED MODELS ******************************************* ************** Main government spending models ***** LSDVC eststo clear * Final baseline model quietly eststo: xtlsdvc govspend $controls $trends, initial(ab) bias(3) vcov(500) * Adding globalization variables quietly foreach x of varlist logfdiflow logfdistock logportequ factor logtrade { capture eststo: xtlsdvc govspend `x' $controls $trends, initial(ab) bias(3) vcov(500) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) order(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)") keep(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) order(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") ***** Arellano and Bond estimation eststo clear * Final baseline model quietly eststo: xtabond govspend $controls $trends, lag(1) artest(2) vce(robust) * Adding globalization variables quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { capture eststo: xtabond govspend `x' $controls $trends, lag(1) artest(2) vce(robust) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) order(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)") keep(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) order(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") ***** OLS with country fixed effects estimation eststo clear * Final baseline model quietly xtreg govspend L1.govspend $controls $trends, fe vce(robust) * Adding globalization variables quietly foreach x of varlist logfdiflow logfdistock logportequ factor logtrade { capture eststo: xtreg govspend L1.govspend `x' $controls $trends, fe vce(robust) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) order(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)") keep(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) order(logfdiflow logfdistock logportequ factor logtrade L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") ********************************************** IMPUTED MODELS ************************************** * Use LSDVC (Kiviet 1999; Bruno 2005): take Arellano-Bond as the initial consistent estimator used to calculate * the bias of the FE estimator; correct bias to highest possible degree (3rd order); then simulate to get * SEs taking 500 simulations from the distribution of the two-step estimator (which takes into account estimation * uncertainty from the first stage). * Sometimes the VCov matrix is not symmetric from the Arellano and Bond initial estimator - we use * capture to get around this problem; this means some results rely on fewer imputed datasets ***** TABLE 1 eststo clear quietly foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit capture eststo: xtlsdvc govspend $controls $trends, initial(ab) bias(3) vcov(500) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(L.govspend $controls) order(L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(L.govspend $controls) order(L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") g factor = . quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { eststo clear foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit drop if cowcode==350 | cowcode==395 xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b capture eststo: xtlsdvc govspend `x' $controls $trends, initial(ab) bias(3) vcov(500) } noisily estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(`x' L.govspend $controls) order(`x' L.govspend $controls) noisily estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(`x' L.govspend $controls) order(L.govspend $controls `x') varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") } * Predicted effects at the median's change display ( ln(91.7 + 1)-ln(9.7 + 1) ) * -1.0743 display ( ln(11.4 + 1)-ln(1.6 + 1) ) * -0.782 display ( ln(41.5 + 1)-ln(0.7 + 1) ) * -1.197 ***** Imputed data: OLS estimation with lagged dependent variable and country fixed effects eststo clear quietly foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit capture eststo: xtreg govspend L.govspend $controls $trends, fe vce(robust) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(L.govspend $controls) order(L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(L.govspend $controls) order(L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") g factor = . quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { eststo clear foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit drop if cowcode==350 | cowcode==395 xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b capture eststo: xtreg govspend L.govspend `x' $controls $trends, fe vce(robust) } noisily estout, cells(b(star fmt(3)) se(par)) stats(N N_g r2_w, fmt(0 0 3)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(`x' L.govspend $controls) order(`x' L.govspend $controls) noisily estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g r2_w, fmt(0 0 3)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(`x' L.govspend $controls) order(L.govspend $controls `x') varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") } ***** Imputed data: Arellano and Bond estimation eststo clear quietly foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit capture eststo: xtabond govspend $controls $trends, lag(1) artest(6) vce(robust) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(L.govspend $controls) order(L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(L.govspend $controls) order(L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") g factor = . quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { eststo clear foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit drop if cowcode==350 | cowcode==395 xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b capture eststo: xtabond govspend `x' $controls $trends, lag(1) artest(6) vce(robust) } noisily estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(`x' L.govspend $controls) order(`x' L.govspend $controls) noisily estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(`x' L.govspend $controls) order(L.govspend $controls `x') varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") } ***** Imputed data: year dummies instead of time trends eststo clear quietly foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit capture eststo: xi: xtlsdvc govspend $controls i.year, initial(ab) bias(3) vcov(500) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(L.govspend $controls) order(L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(L.govspend $controls) order(L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") g factor = . quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { eststo clear foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit drop if cowcode==350 | cowcode==395 xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b capture eststo: xi: xtlsdvc govspend `x' $controls i.year, initial(ab) bias(3) vcov(500) } noisily estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(`x' L.govspend $controls) order(`x' L.govspend $controls) noisily estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(`x' L.govspend $controls) order(L.govspend $controls `x') varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic translag(1) artest(6)rs" autocons "Automatic consumption") } ***** Imputed data: year dummies in addition to time trends eststo clear quietly foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit capture eststo: xi: xtlsdvc govspend $controls $trends i.year, initial(ab) bias(3) vcov(500) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(L.govspend $controls) order(L.govspend $controls) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(L.govspend $controls) order(L.govspend $controls) varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") g factor = . quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { eststo clear foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit drop if cowcode==350 | cowcode==395 xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b capture eststo: xi: xtlsdvc govspend `x' $controls $trends i.year, initial(ab) bias(3) vcov(500) } noisily estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(`x' L.govspend $controls) order(`x' L.govspend $controls) noisily estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(`x' L.govspend $controls) order(L.govspend $controls `x') varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") } ****** Imputed data: instrumenting for globalization variables with orthogonal lags * Note: cannot use robust SEs, and so AR tests not reported (but can check in robust models, and all fine) drop factor g factor = . quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { eststo clear foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit drop if cowcode==350 | cowcode==395 xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b eststo: xtdpd govspend `x' L1.govspend $controls $trends, dgmmiv(govspend, lagrange(2)) dgmmiv(`x', lagrange(2)) div($controls $trends) estat sargan } noisily estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(`x' L.govspend $controls) order(`x' L.govspend $controls) noisily estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0) labels("Observations" "Countries")) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(`x' L.govspend $controls) order(L.govspend $controls `x') varlabels(L.govspend "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") } ****** Social benefit as dependent variable eststo clear quietly foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit capture eststo: xtlsdvc socben $controlsben $trends, initial(ab) bias(3) vcov(500) } estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(L.socben $controlsben) order(L.socben $controlsben) estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(L.socben $controlsben) order(L.socben $controlsben) varlabels(L.socben "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers" autocons "Automatic consumption") g factor = . quietly foreach x of varlist logfdistock logfdiflow logportequ factor logtrade { eststo clear foreach n of numlist 1/10 { use "spendmi`n'.dta", clear xtset cowcode year g lagdeficit = L1.deficit drop if cowcode==350 | cowcode==395 xi: factor logfdistock logfdiflow logportequ i.cowcode, ipf predict factor, b capture eststo: xtlsdvc socben `x' $controlsben $trends, initial(ab) bias(3) vcov(500) } noisily estout, cells(b(star fmt(3)) se(par)) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") legend starlevels(* 0.10 ** 0.05 *** 0.01) keep(`x' L.socben $controlsben) order(`x' L.socben $controlsben) noisily estout, style(fixed) delimiter(|) varwidth(0) modelwidth(0) cells(b(fmt(5)) se(fmt(5))) stats(N N_g, fmt(0 0)) mlabels("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)" "(9)" "(10)") keep(`x' L.socben $controlsben) order(L.socben $controlsben `x') varlabels(L.socben "LDV" deindust "Deindustrialization" govparty "Partisanship" deppop "Dependent population" deficit "Deficit" lagdeficit "Deficit (lag)" pr "PR" unionlevel "Strength of labor" unexpgrowthpc "Unexpected growth" autotrans "Automatic transfers") }