************************************************************************************************************** #Title: Immediate and long-term changes in infectious diseases in China at the "First-level-response", "Normalized-control" and "Dynamic-COVID-zero" stages from 2020 to 2022: A multistage interrupted-time-series-analysis ************************************************************************************************************** ***************************************************************************************** #Variable Explanation ***************************************************************************************** #Interrupted time series model in this study includes the following variables #var1 is date (year and month); #var2 is the number of monthly cases of infectious diseases; #var3 is time variable (January 2017 to July 2022)(with values of 1, 2, 3, …, n in order by time); #var4 is an intervention variable which represented the introduction of “First-level-response” (0 prior to February 2020, 1 from February 2020); #var5 is the time variable after the introduction of “First-level-response” (0 prior to February 2020, with values of 0, 1, 2, …, n in order by time from February 2020); #var6 is an intervention variable which represented the introduction of “Normalized-control” (0 prior to May 2020, 1 from May 2020); #var7 is the time variable after the introduction of “Normalized-control” (0 prior to May 2020, with values of 0, 1, 2, …, n in order by time from May 2020); #var8 is an intervention variable which represented the introduction of “Dynamic-COVID-zero” (0 prior to August 2021, 1 from August 2021); #var9 is the time variable after the introduction of “Dynamic-COVID-zero” (0 prior to August 2021, with values of 0, 1, 2, …, n in order by time from August 2021); #var10 is the total population of mainland China. ************************************************************************************************************** Fitting ITSA using Poisson regression ************************************************************************************************************** #log transform the population: gen var11=log(var10) #Poisson model fitting (using the population [log transformed] as an offset variable) glm var2 var3 var4 var5 var6 var7 var8 var9, family(poisson) link(log) offset(var11) eform #Adjust for seasonality (used Fourier terms [pairs of sine and cosine functions]) gen degrees=(var3/12)*360 fourier degrees, n(2) # IRR and its 95% CI will be reported glm var2 cos* sin* var3 var4 var5 var6 var7 var8 var9, family(poisson) link(log) offset(var11) eform lincom _b[var4]+ _b[var6], eform lincom _b[var5]+ _b[var7], eform lincom _b[var4]+ _b[var6]+ _b[var8], eform lincom _b[var5]+ _b[var7]+ _b[var9], eform lincom _b[var6]+ _b[var8], eform lincom _b[var7]+ _b[var9], eform lincom _b[var3]+ _b[var5], eform lincom _b[var3]+ _b[var5]+ _b[var7], eform lincom _b[var3]+ _b[var5]+ _b[var7]+ _b[var9], eform #Regression coefficient (β) and its 95% CI will be reported glm var2 cos* sin* var3 var4 var5 var6 var7 var8 var9, family(poisson) link(log) offset(var11) lincom _b[var4]+ _b[var6] lincom _b[var5]+ _b[var7] lincom _b[var4]+ _b[var6]+ _b[var8] lincom _b[var5]+ _b[var7]+ _b[var9] lincom _b[var6]+ _b[var8] lincom _b[var7]+ _b[var9] lincom _b[var3]+ _b[var5] lincom _b[var3]+ _b[var5]+ _b[var7] lincom _b[var3]+ _b[var5]+ _b[var7]+ _b[var9] *************************************************************************************************************** #Interrupted time series analysis graph production *************************************************************************************************************** #Drawing predicted by counterfactual based on the unadjusted regression model after the outbreak of COVID-19 in 2020 and predicted trend based on the seasonally adjusted regression model glm var2 var3 var4 var5, family(poisson) link(log) offset(var11) eform predict pred, nooffset gen rate1 = var2/var10 gen pred1 = pred/exp(_b[var4]) if var4==1 gen degrees=(var3/12)*360 fourier degrees, n(2) glm var2 cos* sin* var3 var4 var5 var6 var7 var8 var9, family(poisson) link(log) offset(var11) eform gen rate2 = var2/var10 predict pred2, nooffset twoway (scatter rate2 var3) (line pred var3, lcolor(red)) (line pred1 var3, lcolor(red) lpattern(dash))(line pred2 var3, lcolor(black)) twoway (scatter rate2 var1) (line pred var1,lcolor(red)) (line pred1 var1,lcolor(red) lpattern(dash))(line pred2 var1,lcolor(black)) twoway(scatter rate2 var3)(line pred var3,lcolor(red))(line pred1 var3,lcolor(red) lpattern(dash))(line pred2 var3,lcolor(black)), xline(37) xline(41) xline(56) #The picture style, colors and lines can be modified manually in Stata *************************************************************************************************************** #Forest plots production *************************************************************************************************************** #Introducing the value of each IRR, the upper and lower of its 95% CI and P-value in Stata gen logIRR=log(IRR) gen logIRRupper=log(IRRupper) gen logIRRlower=log(IRRlower) metan logIRR logIRRupper logIRRlower, label(namevar=Variables) random effect(IRR) eform nowt nooverall nobox rcols(P-value)dp(3)