clear
capture estimates drop
use MI_ICVS_dataset.dta, clear


* Table 4

* compare: just one US dummy for all years

foreach depvar of global ICVS {
mi estimate, post: reg `depvar' USA $notimputable $imputable i.I003 ib5.I002A [pw=1/freq], cluster(numISO)
estimates store `depvar'
test $imputable $notimputable
estadd scalar pF=r(p)
}

esttab $ICVS using results/table4_alt_onedummyallyears, ///
	replace csv label b(a2) se(a2) scalars(N_clust pF) sfmt(0 3) star(* 0.10 ** 0.05 *** 0.01) nogaps nonumbers drop(*.I* _cons) ///
	title(Victimization (ICVS 1989-2005)) mtitles($ICVSnames) ///
	coeflabels($variabledescriptions) ///
	nonotes addnotes("All dependent variables are log-transformed." "Pooled OLS with sweep and surveytype fixed effects, equal country weights." "Country-clustered standard errors in parentheses (* p<0.10, ** p<0.05, *** p<0.01).")

estimates drop *

* table 4: annual US dummies
	
foreach depvar of global ICVS {
mi estimate, post: reg `depvar' ibn.year#1.USA $notimputable $imputable i.I003 ib5.I002A [pw=1/freq], cluster(numISO)
estimates store `depvar'
test $imputable $notimputable
estadd scalar pF=r(p)
}

esttab $ICVS using results/table4, ///
	replace csv label b(a2) se(a2) scalars(N_clust pF) sfmt(0 3) star(* 0.10 ** 0.05 *** 0.01) nogaps nonumbers drop( _cons) ///
	title(Victimization (ICVS 1989-2005)) mtitles($ICVSnames) ///
	coeflabels($variabledescriptions) ///
	nonotes addnotes("All dependent variables are log-transformed." "Pooled OLS with sweep and surveytype fixed effects, equal country weights." "Country-clustered standard errors in parentheses (* p<0.10, ** p<0.05, *** p<0.01).")
