# Modeling COVID-19 Infection Rates by Regime-Switching Unobserved Components Models

^{1}

^{2}

^{3}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Data and Methodology

## 3. Empirical Results

**3 June 2020–10 July 2020**10.04.: The U.S. is the country with the most reported COVID-19 cases and deaths worldwide. 13.04.: Most states in the U.S. report widespread cases of COVID-19. 13.06.: CDC releases consolidated COVID-19 testing guidelines. 22.06.: The U.S. President extends the temporary suspension on new immigrant visas through the end of the year. 30.06.: Dr. Anthony Fauci warns of new infections overwhelming the healthcare system. 01.07.: The U.S. has more than 50 K new daily COVID-19 cases. 14.07.: The CDC again calls on all people to wear cloth face masks when leaving their homes.**6 October 2020–20 November 2020**04.11.: New U.S. COVID-19 cases surpass 100 K in a day. 10.11.: Total cases of COVID-19 in the U.S. surge past 10 M. 13.11.: COVID-19 case numbers spike across the U.S. after Halloween celebrations. 20.11.: The CDC recommends to stay home for Thanksgiving and to avoid contact as case numbers surge.**26 June 2021–23 August 2021**27.07.: Amid a Delta variant surge, the CDC releases updated guidance recommending that everyone in areas with high transmission wears a mask. 30.07.: The CDC releases data suggesting that vaccinated people infected with Delta can transmit the virus to others. 23.08.: The FDA fully approves the Pfizer–BioNTech COVID-19 vaccine for all people ages 18 years and older.**22 November 2021–14 January 2022**26.11.: The WHO designates the COVID-19 Omicron variant as a “variant of concern”. 20.12.: The CDC releases data estimating that the Omicron variant is around 1.6 times more transmissible than the Delta variant. 27.12.: The CDC shortens the recommended isolation period for people with COVID-19 to six days.**4 April 2022–25 May 2022**13.04.: The Omicron subvariant BA.2 makes up more than 85% of all new COVID-19 infections in the U.S. 18.04.: The CDC’s mask mandate for indoor public transportation is struck down in court. 21.04.: The DHS extends the COVID-19 vaccine requirement for all noncitizens entering the U.S.**28 November 2022–8 December 2022**08.12.: The FDA authorizes bivalent COVID-19 vaccines for children as young as 6 months of age. 15.12.: The Biden administration announces the COVID-19 Winter Preparedness plan.

## 4. Robustness and Discussion

## 5. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

AR | Autoregressive |

EM | Expectation-Maximization |

JH/CSSE | Johns Hopkins University Center for Systems Science and Engineering |

RW | Random Walk |

UC | Unobserved Components |

## Notes

1 | Harvey (1989) refers to these models as structural time series models. To avoid confusion, the term UC model is used for any state-space model that specifies one or multiple time series as a function of latent components and assigns an interpretation to these components by imposing assumptions on their spectra. |

2 | Carvalho et al. (2021) and the U.S. Centers for Disease Control and Prevention (https://www.cdc.gov/museum/timeline/covid19.html, accessed on 14 March 2023), provide an exhaustive timeline regarding the development of the COVID-19 pandemic. Additional data on the number of performed tests, as well as on a wide range of other indicators, can be found at https://ourworldindata.org/coronavirus (accessed on 14 March 2023) (Ritchie et al. 2020). |

3 | It is reasonable to assume that the number of reported COVID-19 cases in the last week of the year is again biased downward due to the holiday period. We therefore omit the last week of 2022 and end the observational horizon of our analysis on the 25th of December. |

4 | Constraining the parameter space to $p,q>90\%$ implies a maximum expected value of three regime switches per 30 days. This is a reasonable constraint given the realized dynamics of the COVID-19 pandemic and, furthermore, speeds up the parameter optimization. |

5 | Note that we estimate ${\nu}_{0}$ as part of the state vector. However, the state-space representation of the model in (1) to (5) is not uniquely defined. Different, albeit observationally identical approaches, such as, e.g., the estimation of ${\nu}_{0}$ via ML or constraining ${\nu}_{1}$ to be >0 and flipping labels with ${\nu}_{0}$, are possible. |

6 | A more detailed and extensive overview can be seen at https://www.cdc.gov/museum/timeline/covid19.html (accessed on 14 March 2023) as well as https://www.defense.gov/Spotlights/Coronavirus-DOD-Response/Timeline/ (accessed on 14 March 2023). |

7 | Another way to get rid of the strong seasonal pattern would be to take seven-day averages of the log case numbers before estimating the model, which would yield a smooth series and eliminate the seasonal variation. |

8 | Since the focus of the analysis lies on identifying coherent periods of up- or down-turning infection regimes, we do not constrain ${P}_{22}$ to be >90%. |

## References

- Bauer, Dietmar, and Martin Wagner. 2012. A state space canonical form for unit root processes. Econometric Theory 28: 1313–49. [Google Scholar] [CrossRef]
- Bergman, Aviv, Yehonatan Sella, Peter Agre, and Arturo Casadevall. 2020. Oscillations in U.S. COVID-19 incidence and mortality data reflect diagnostic and reporting factors. mSystems 5: e00544–20. [Google Scholar] [CrossRef]
- Carvalho, Thiago, Florian Krammer, and Akiko Iwasaki. 2021. The first 12 months of COVID-19: A timeline of immunological insights. Nature Reviews Immunology 21: 245–56. [Google Scholar] [CrossRef] [PubMed]
- Degras, David, Chee-Ming Ting, and Hernando Ombao. 2022. Markov-switching state-space models with applications to neuroimaging. Computational Statistics & Data Analysis 174: 107525. [Google Scholar] [CrossRef]
- Dolton, Peter. 2021. The statistical challenges of modelling COVID-19. National Institute Economic Review 257: 46–82. [Google Scholar] [CrossRef]
- Dong, Ensheng, Hongru Du, and Lauren Gardner. 2020. An interactive web-based dashboard to track COVID-19 in real time. The Lancet Infectious Diseases 20: 533–34. [Google Scholar] [CrossRef] [PubMed]
- Doornik, Jurgen A., Jennifer L. Castle, and David F. Hendry. 2021. Modeling and forecasting the COVID-19 pandemic time-series data. Social Science Quarterly 102: 2070–87. [Google Scholar] [CrossRef]
- Doornik, Jurgen A., Jennifer L. Castle, and David F. Hendry. 2022. Short-term forecasting of the Coronavirus pandemic. International Journal of Forecasting 38: 453–66. [Google Scholar] [CrossRef]
- Durbin, James, and Siem Jan Koopman. 2012. Time Series Analysis by State Space Methods: Second Edition. Oxford: Oxford University Press. [Google Scholar] [CrossRef]
- Fiscon, Giulia, Francesco Salvadore, Valerio Guarrasi, Anna Rosa Garbuglia, and Paola Paci. 2021. Assessing the impact of data-driven limitations on tracing and forecasting the outbreak dynamics of COVID-19. Computers in Biology and Medicine 135: 104657. [Google Scholar] [CrossRef]
- Frühwirth-Schnatter, Sylvia. 2006. Finite Mixture and Markov Switching Models. New York: Springer. [Google Scholar] [CrossRef]
- Hamilton, James D. 1989. A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica 57: 357–84. [Google Scholar] [CrossRef]
- Harrison, Peter J., and C. F. Stevens. 1976. Bayesian forecasting. Journal of the Royal Statistical Society: Series B 38: 205–28. [Google Scholar] [CrossRef]
- Hartl, Tobias, and Roland Jucknewitz. 2022. Approximate state space modelling of unobserved fractional components. Econometric Reviews 41: 75–98. [Google Scholar] [CrossRef]
- Hartl, Tobias, Klaus Wälde, and Enzo Weber. 2020. Measuring the impact of the German public shutdown on the spread of COVID-19. Covid Economics: Vetted and Real-Time Papers 1: 25–32. [Google Scholar]
- Harvey, Andrew C. 1989. Forecasting, Structural Time Series Models and the Kalman Filter. Cambridge: Cambridge University Press. [Google Scholar]
- Hortaçsu, Ali, Jiarui Liu, and Timothy Schwieg. 2021. Estimating the fraction of unreported infections in epidemics with a known epicenter: An application to COVID-19. Journal of Econometrics 220: 106–29. [Google Scholar] [CrossRef] [PubMed]
- Kaufmann, Sylvia. 2015. K-state switching models with time-varying transition distributions—Does loan growth signal stronger effects of variables on inflation? Journal of Econometrics 187: 82–94. [Google Scholar] [CrossRef]
- Kim, Chang-Jin. 1994. Dynamic linear models with Markov-switching. Journal of Econometrics 60: 1–22. [Google Scholar] [CrossRef]
- Kim, Chang-Jin, and Charles R. Nelson. 2017. State-Space Models with Regime Switching: Classical and Gibbs-Sampling Approaches with Applications. Cambridge: MIT Press. [Google Scholar] [CrossRef]
- Kim, Young Min, and Kyu Ho Kang. 2019. Likelihood inference for dynamic linear models with Markov switching parameters: On the efficiency of the Kim filter. Econometric Reviews 38: 1109–30. [Google Scholar] [CrossRef]
- Lee, Sokbae, Yuan Liao, Myung Hwan Seo, and Youngki Shin. 2021. Sparse HP filter: Finding kinks in the COVID-19 contact rate. Journal of Econometrics 220: 158–80. [Google Scholar] [CrossRef] [PubMed]
- Liu, Laura, Hyungsik Roger Moon, and Frank Schorfheide. 2021. Panel forecasts of country-level COVID-19 infections. Journal of Econometrics 220: 2–22. [Google Scholar] [CrossRef] [PubMed]
- Luginbuhl, Rob, and Aart de Vos. 1999. Bayesian analysis of an unobserved-component time series model of GDP with Markov-switching and time-varying growths. Journal of Business & Economic Statistics 17: 456–65. [Google Scholar] [CrossRef]
- Moosa, Imad A. 2020. The effectiveness of social distancing in containing COVID-19. Applied Economics 52: 6292–05. [Google Scholar] [CrossRef]
- Navas Thorakkattle, Muhammed, Shazia Farhin, and Athar Ali Khan. 2022. Forecasting the trends of COVID-19 and causal impact of vaccines using Bayesian structural time series and ARIMA. Annals of Data Science 9: 1025–47. [Google Scholar] [CrossRef]
- Ritchie, Hannah, Edouard Mathieu, Lucas Rodés-Guirao, Cameron Appel, Charlie Giattino, Esteban Ortiz-Ospina, Joe Hasell, Bobbie Macdonald, Diana Beltekian, and Max Roser. 2020. Coronavirus pandemic (COVID-19). Our World in Data. Available online: https://ourworldindata.org/coronavirus (accessed on 14 March 2023).
- Telenti, Amalio, Ann Arvin, Lawrence Corey, Davide Corti, Michael S. Diamond, Adolfo García-Sastre, Robert F. Garry, Edward C. Holmes, Phillip S. Pang, and Herbert W. Virgin. 2021. After the pandemic: Perspectives on the future trajectory of COVID-19. Nature 596: 495–504. [Google Scholar] [CrossRef]
- Xie, Liming. 2022. The analysis and forecasting COVID-19 cases in the United States using Bayesian structural time series models. Biostatistics & Epidemiology 6: 1–15. [Google Scholar] [CrossRef]

**Figure 1.**Daily U.S. COVID-19 infections ${i}_{t}$ (orange, right scale) and logarithm of daily infections $log\left({i}_{t}\right)$ (gray, left scale). The vertical line (gray, dashed) indicates the 1st of April 2020, the start of the observational period.

**Figure 2.**Parameter-specific kernel densities of the final-step grid search results. The respective best estimate is marked in red. Note that p and q are floored at 90% (see Section 2).

**Figure 3.**Smoothed trend estimates ${\widehat{\mu}}_{t}$ (orange, left scale), smoothed regime probabilities $\widehat{Pr}({S}_{t}=0|{y}_{T},\dots ,{y}_{1})$ (blue, right scale), and log COVID-19 cases $log\left({i}_{t}\right)$ (gray, left scale). The smoothed trend is a probability-weighted average of the two regime-specific trend estimates. Infection waves (up-turning regime) as identified by $\widehat{Pr}({S}_{t}=0|{y}_{T},\dots ,{y}_{1})>40\%$ are shaded.

**Figure 4.**Smoothed regime probabilities $\widehat{Pr}({S}_{t}=0|{y}_{T},\dots ,{y}_{1})$ (blue) and filtered regime probabilities $\widehat{Pr}({S}_{t}=0|{y}_{t-1},\dots ,{y}_{1})$ (orange) for the up-turning regime. Days on which the filtered predictions $\widehat{Pr}({S}_{t}=0|{y}_{t-1},\dots ,{y}_{1})$ exceed a threshold of $40\%$ are shaded. Horizontal black bars denote infection waves based on the smoothed estimates from Figure 3.

**Figure 5.**One hundred simulated paths of the seasonal component ${\gamma}_{t}^{UR}$, as given in (6) (gray). The orange sample path depicts a single exemplary trajectory.

**Figure 6.**Smoothed trend $\widehat{\mu}$ (dashed, left scale) and regime probability $\widehat{Pr}({S}_{t}=0|{y}_{T},...,{y}_{1})$ (right scale) estimates for the preferred D.Seas.C. specification (orange, see Table 1), as well as for the seasonal unit root UR.Seas. model (grey, see Table 3) using the Kim filter. Averaged posterior draws of the trend and regime probabilities for the D.Seas.C. model as derived by the Gibbs sampler are shown in blue (see Table 4).

Parameter | Estimate | Standard Error |
---|---|---|

${\sigma}_{\xi}$ | 0.073 | 0.008 |

${\sigma}_{\eta}$ | 0.409 | 0.010 |

${\nu}_{0}$ | 0.033 | 0.004 |

${\nu}_{1}$ | −0.048 | 0.010 |

${\varphi}_{1}$ | 0.440 | 0.033 |

${\varphi}_{2}$ | −0.270 | 0.032 |

q | 0.969 | 0.017 |

p | 0.988 | 0.010 |

Log L: −677.783 AIC: 1.379 BIC: 1.452 HQ: 1.407 |

**Table 2.**Periods of the up-turning ${S}_{t}=0$ regime as identified by smoothed estimates and corresponding nowcasting one-step-ahead predictions.

Smoothed Estimates | Filtered One-Step-Ahead Predictions | |||
---|---|---|---|---|

Infection Wave | Beginning | End | Beginning | End |

1 | 3 June 2020 | 10 July 2020 | - | - |

2 | 6 Oct 2020 | 20 Nov 2020 | 9 Oct 2020 | 10 Oct 2020 |

12 Oct 2020 | 13 Oct 2020 | |||

15 Oct 2020 | 17 Oct 2020 | |||

19 Oct 2020 | 22 Nov 2020 | |||

24 Nov 2020 | 25 Nov 2020 | |||

3 | 26 June 2021 | 23 Aug 2021 | 26 June 2021 | 27 June 2021 |

3 July 2021 | 4 July 2021 | |||

7 July 2021 | 9 Aug 2021 | |||

4 | 22 Nov 2021 | 14 Jan 2022 | 17 Nov 2021 | 24 Nov 2021 |

27 Nov 2021 | 29 Nov 2021 | |||

9 Dec 2021 | 28 Dec 2022 | |||

31 Dec 2021 | 1 Jan 2022 | |||

06 Jan 2021 | 15 Jan 2022 | |||

5 | 04 Apr 2022 | 25 May 2022 | 9 Apr 2022 | 10 Apr 2022 |

9 Apr 2022 | 10 Apr 2022 | |||

14 Apr 2022 | 15 Apr 2022 | |||

21 Apr 2022 | 8 May 2022 | |||

10 May 2022 | 22 May 2022 | |||

24 May 2022 | 28 May 2022 | |||

6 | 28 Noc 2022 | 8 Dec 2022 | 1 Dec 2022 | 3 Dec 2022 |

6 Dec 2022 | 10 Dec 2022 |

D.Seas.C. | D.Seas. | UR.Seas.C. | UR.Seas. | D.Seas. 3 St. | |
---|---|---|---|---|---|

${\sigma}_{\xi}$ | 0.073 | 0.081 | 0.075 | 0.075 | 0.042 |

(0.008) | (0.010) | (0.006) | (0.006) | (0.012) | |

${\sigma}_{\omega}$ | - | - | 0.005 | 0.005 | - |

(0.001) | (0.001) | ||||

${\sigma}_{\u03f5}$ | - | 0.445 | - | 0.188 | - |

(0.011) | (0.006) | ||||

${\sigma}_{\eta}$ | 0.409 | - | 0.188 | - | 0.322 |

(0.010) | (0.006) | (0.008) | |||

${\nu}_{0}$ | 0.033 | 0.034 | 0.004 | 0.042 | 0.035 |

(0.004) | (0.004) | (0.003) | (0.004) | (0.006) | |

${\nu}_{1}$ | −0.048 | −0.047 | −0.055 | −0.055 | −0.257 |

(0.010) | (0.012) | (0.013) | (0.013) | (0.027) | |

${\varphi}_{1}$ | 0.440 | - | 0.007 | - | 0.272 |

(0.033) | (0.767) | (0.038) | |||

${\varphi}_{2}$ | −0.270 | - | 0 | - | −0.185 |

(0.032) | (0.009) | (0.033) | |||

$q,{P}_{00}$ | 0.969 | 0.971 | 0.972 | 0.973 | 0.900 |

(0.017) | (0.017) | (0.014) | (0.013) | (0.001) | |

${P}_{01}$ | - | - | - | - | 0.092 |

(0.019) | |||||

${P}_{10}$ | - | - | - | - | 0 |

(0.001) | |||||

$p,{P}_{11}$ | 0.988 | 0.990 | 0.976 | 0.991 | 0.947 |

(0.010) | (0.008) | (0.007) | (0.007) | (0.019) | |

${P}_{20}$ | - | - | - | - | 0.018 |

(0.010) | |||||

${P}_{21}$ | - | - | - | - | 0.007 |

(0.003) | |||||

Log L | −677.783 | −768.670 | −157.759 | −161.242 | −662.714 |

AIC | 1.379 | 1.552 | 0.348 | 0.347 | 1.376 |

BIC | 1.452 | 1.605 | 0.431 | 0.410 | 1.518 |

HQ | 1.407 | 1.572 | 0.379 | 0.371 | 1.430 |

Mean | Std.Dev | Median | 2.5% | 97.5% | |
---|---|---|---|---|---|

${\sigma}_{\xi}$ | 0.033 | 0.009 | 0.031 | 0.023 | 0.060 |

${\sigma}_{\eta}$ | 0.424 | 0.010 | 0.424 | 0.404 | 0.445 |

${\nu}_{0}$ | 0.065 | 0.037 | 0.054 | 0.025 | 0.174 |

${\nu}_{1}$ | −0.089 | 0.030 | −0.080 | −0.178 | −0.058 |

${\varphi}_{1}$ | 0.433 | 0.035 | 0.433 | 0.364 | 0.500 |

${\varphi}_{2}$ | −0.254 | 0.034 | −0.254 | −0.319 | −0.186 |

q | 0.902 | 0.002 | 0.902 | 0.900 | 0.908 |

p | 0.911 | 0.015 | 0.904 | 0.900 | 0.955 |

$\mathit{T}=1000$ | Mean | Std.Dev | Median | 95% CI |
---|---|---|---|---|

${\sigma}_{\xi}=0.050$ | 0.046 | 0.025 | 0.044 | [0.045; 0.048] |

${\sigma}_{\eta}=0.500$ | 0.499 | 0.013 | 0.499 | [0.499; 0.500] |

${\nu}_{0}=0.040$ | 0.037 | 0.035 | 0.040 | [0.036; 0.039] |

${\nu}_{1}$ = −0.060 | −0.357 | 8.903 | −0.060 | [−0.819; 0.104] |

${\varphi}_{1}=0.500$ | 0.497 | 0.036 | 0.497 | [0.495; 0.499] |

${\varphi}_{2}$ = −0.200 | −0.194 | 0.036 | −0.194 | [−0.196; −0.192] |

$q=0.970$ | 0.973 | 0.018 | 0.976 | [0.972; 0.974] |

$p=0.990$ | 0.986 | 0.015 | 0.990 | [0.986; 0.987] |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Haimerl, P.; Hartl, T.
Modeling COVID-19 Infection Rates by Regime-Switching Unobserved Components Models. *Econometrics* **2023**, *11*, 10.
https://doi.org/10.3390/econometrics11020010

**AMA Style**

Haimerl P, Hartl T.
Modeling COVID-19 Infection Rates by Regime-Switching Unobserved Components Models. *Econometrics*. 2023; 11(2):10.
https://doi.org/10.3390/econometrics11020010

**Chicago/Turabian Style**

Haimerl, Paul, and Tobias Hartl.
2023. "Modeling COVID-19 Infection Rates by Regime-Switching Unobserved Components Models" *Econometrics* 11, no. 2: 10.
https://doi.org/10.3390/econometrics11020010