use "H:\oldTS1desktop\ECNS 561\Data Sets\Mega HW #2\KS_Crime_Data_Set_for_Mega_HW_2.dta", clear
keep year county_fips county dry wet violent_rate property_rate unemployment democrat_to_gop pop_density per_over21 per_nonwhite
reg violent_rate unemployment democrat_to_gop pop_density per_over21 per_nonwhite
*Testing whether the coefficients on per_over21 and per_nonwhite are equal
test per_over21 = per_nonwhite
*Testing joint significance of democrat_to_gop and pop_density, holding other factors constant
test (democrat_to_gop = 0) (pop_density = 0)
*Shorthand for this can be written as
test democrat_to_gop pop_density
*Testing joint hypothesis where the null is more complicated than just excluding some independent variables
test (unemployment = .05) (democrat_to_gop = 0) (pop_density = 0) (per_over21 = 0) (per_nonwhite = 0)