I have panel data over 58 periods and across the 50 US states which gives 2900 observations. I examine the effect of COVID-19 mandates on the proportion of people reporting mental health in a state. My model includes fixed effects and also lags of 3 COVID-19 mandates: Mask Stay and School.
When doing a moving average over the lags for 4 periods before the period ( = 2 months since each period is 2 weeks) I get significant results.
When using 4 lags of the dependant variable I get similar results that are also significant.
However, when doing lags of the independent variables ( Mask, School, Stay ) for 3 periods I get very statistically insignificant values. I have my code below. If anyone can help me i would really appreciate it and please tell me if you need more info and how I can share it.
1st regression:
egen mask_time = mean(past_mask), by(Time)
egen stay_time = mean(past_stay), by(Time)
egen school_time = mean(past_school), by(Time)
egen travel_time = mean(past_travel), by(Time)
egen business_time = mean(past_business), by(Time)
*Including controlls for time (moving average)
reg mental_health emp deaths infections repub i.Time i.States business travel School Stay Mask mask_time stay_time school_time travel_time business_time if Time>=5
estimates store US
. reg mental_health emp deaths infections repub i.Time i. States business travel School Stay Mask mask_time stay_time school_time travel_time business_time if repub == 0 & Time>=5
. estimates store DEM
reg mental_health emp deaths infections repub i.Time i.States business travel School Stay Mask mask_time stay_time school_time travel_time business_time if repub==1 & Time>=5
. estimates store REP
coefplot US DEM REP, keep(Mask Stay School) xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.1) levels( 95 90)
2nd:
gen mental_health_L1 = mental_health[_n-1]
. gen mental_health_L2 = mental_health[_n-2]
. gen mental_health_L3 = mental_health[_n-3]
. gen mental_health_L4 = mental_health[_n-4]
reg mental_health School Stay Mask business travel emp infections deaths repub i. Time i.States mental_health_L1 mental_health_L2 mental_health_L3 mental_health_L4
estimates store US
reg mental_health School Stay Mask business travel emp infections deaths repub i.Time i.States mental_health_L1 mental_health_L2 mental_health_L3 mental_health_L4 if repub ==1
estimates store REP
reg mental_health School Stay Mask business travel emp infections deaths repub i.Time i.States mental_health_L1 mental_health_L2 mental_health_L3 mental_health_L4 if repub ==0
estimates store DEM
coefplot US DEM REP, keep(Mask Stay School) xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.1) levels( 95 90)
3rd:
gen Maskdays_L1 = Mask[_n-1]*13
gen Maskdays_L2 = Mask[_n-2]*13
gen Maskdays_L3 = Mask[_n-3]*13
gen Maskdays_L4 = Mask[_n-4]*13
gen Staydays_L1 = Stay[_n-1]*13
gen Staydays_L2 = Stay[_n-2]*13
gen Staydays_L3 = Stay[_n-3]*13
gen Staydays_L4 = Stay[_n-4]*13
gen Schooldays_L1 = School[_n-1]*13
gen Schooldays_L2 = School[_n-2]*13
gen Schooldays_L3 = School[_n-3]*13
gen Schooldays_L4 = School[_n-4]*13
reg mental_health i.States i.Time School Stay Mask business travel Maskdays_L1 Maskdays_L2 Maskdays_L3 Maskdays_L4 Staydays_L1 Staydays_L2 Staydays_L3 Staydays_L4 Schooldays_L1 Schooldays_L2 Schooldays_L3 Schooldays_L4 repub emp deaths infections
estimates store US
reg mental_health i.States i.Time School Stay Mask business travel Maskdays_L1 Maskdays_L2 Maskdays_L3 Maskdays_L4 Staydays_L1 Staydays_L2 Staydays_L3 Staydays_L4 Schooldays_L1 Schooldays_L2 Schooldays_L3 Schooldays_L4 repub emp deaths infections if repub==0
estimates store DEM
reg mental_health i.States i.Time School Stay Mask business travel Maskdays_L1 Maskdays_L2 Maskdays_L3 Maskdays_L4 Staydays_L1 Staydays_L2 Staydays_L3 Staydays_L4 Schooldays_L1 Schooldays_L2 Schooldays_L3 Schooldays_L4 repub emp deaths infections if repub ==1
estimates store REP
coefplot US DEM REP, keep(Mask Stay School) xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.1) levels( 95 90)
I thought the issue was that the moving average was in days and the lags were a proportion of days. However, when converting to days by multiplying by 13 nothing changed.
Again please help !
When doing a moving average over the lags for 4 periods before the period ( = 2 months since each period is 2 weeks) I get significant results.
When using 4 lags of the dependant variable I get similar results that are also significant.
However, when doing lags of the independent variables ( Mask, School, Stay ) for 3 periods I get very statistically insignificant values. I have my code below. If anyone can help me i would really appreciate it and please tell me if you need more info and how I can share it.
1st regression:
egen mask_time = mean(past_mask), by(Time)
egen stay_time = mean(past_stay), by(Time)
egen school_time = mean(past_school), by(Time)
egen travel_time = mean(past_travel), by(Time)
egen business_time = mean(past_business), by(Time)
*Including controlls for time (moving average)
reg mental_health emp deaths infections repub i.Time i.States business travel School Stay Mask mask_time stay_time school_time travel_time business_time if Time>=5
estimates store US
. reg mental_health emp deaths infections repub i.Time i. States business travel School Stay Mask mask_time stay_time school_time travel_time business_time if repub == 0 & Time>=5
. estimates store DEM
reg mental_health emp deaths infections repub i.Time i.States business travel School Stay Mask mask_time stay_time school_time travel_time business_time if repub==1 & Time>=5
. estimates store REP
coefplot US DEM REP, keep(Mask Stay School) xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.1) levels( 95 90)
2nd:
gen mental_health_L1 = mental_health[_n-1]
. gen mental_health_L2 = mental_health[_n-2]
. gen mental_health_L3 = mental_health[_n-3]
. gen mental_health_L4 = mental_health[_n-4]
reg mental_health School Stay Mask business travel emp infections deaths repub i. Time i.States mental_health_L1 mental_health_L2 mental_health_L3 mental_health_L4
estimates store US
reg mental_health School Stay Mask business travel emp infections deaths repub i.Time i.States mental_health_L1 mental_health_L2 mental_health_L3 mental_health_L4 if repub ==1
estimates store REP
reg mental_health School Stay Mask business travel emp infections deaths repub i.Time i.States mental_health_L1 mental_health_L2 mental_health_L3 mental_health_L4 if repub ==0
estimates store DEM
coefplot US DEM REP, keep(Mask Stay School) xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.1) levels( 95 90)
3rd:
gen Maskdays_L1 = Mask[_n-1]*13
gen Maskdays_L2 = Mask[_n-2]*13
gen Maskdays_L3 = Mask[_n-3]*13
gen Maskdays_L4 = Mask[_n-4]*13
gen Staydays_L1 = Stay[_n-1]*13
gen Staydays_L2 = Stay[_n-2]*13
gen Staydays_L3 = Stay[_n-3]*13
gen Staydays_L4 = Stay[_n-4]*13
gen Schooldays_L1 = School[_n-1]*13
gen Schooldays_L2 = School[_n-2]*13
gen Schooldays_L3 = School[_n-3]*13
gen Schooldays_L4 = School[_n-4]*13
reg mental_health i.States i.Time School Stay Mask business travel Maskdays_L1 Maskdays_L2 Maskdays_L3 Maskdays_L4 Staydays_L1 Staydays_L2 Staydays_L3 Staydays_L4 Schooldays_L1 Schooldays_L2 Schooldays_L3 Schooldays_L4 repub emp deaths infections
estimates store US
reg mental_health i.States i.Time School Stay Mask business travel Maskdays_L1 Maskdays_L2 Maskdays_L3 Maskdays_L4 Staydays_L1 Staydays_L2 Staydays_L3 Staydays_L4 Schooldays_L1 Schooldays_L2 Schooldays_L3 Schooldays_L4 repub emp deaths infections if repub==0
estimates store DEM
reg mental_health i.States i.Time School Stay Mask business travel Maskdays_L1 Maskdays_L2 Maskdays_L3 Maskdays_L4 Staydays_L1 Staydays_L2 Staydays_L3 Staydays_L4 Schooldays_L1 Schooldays_L2 Schooldays_L3 Schooldays_L4 repub emp deaths infections if repub ==1
estimates store REP
coefplot US DEM REP, keep(Mask Stay School) xline(0) recast(bar) ciopts(recast(rcap)) citop barwidt(0.1) levels( 95 90)
I thought the issue was that the moving average was in days and the lags were a proportion of days. However, when converting to days by multiplying by 13 nothing changed.
Again please help !