Learn R Programming

tsgc (version 0.0)

forecast.peak: Returns forecast of number of periods until peak given estimated state variables \(\delta\) and \(\gamma\).

Description

Since Harvey and Kattuman (2021) show that $$g_{y,t+\ell|T} = \exp\{\delta_{T|T}+\ell \gamma_{T|T}\}+\gamma_{T|T},$$ we can compute the \(\ell\) for which \(g_{y,t}=0\) and then will fall below zero. This \(\ell\) is given by $$\ell = \frac{\ln(-\gamma_{T|T})-\delta_{T|T}}{\gamma_{T|T}}.$$ This is predicated on \(\gamma_{T|T}<0\), else there is super-exponential growth an no peak in sight. Of course, it only makes sense to investigate an upcoming peak for \(g_{y,T|T}>0\) (when cases are growing).

Usage

forecast.peak(delta, gamma)

Value

Forecast of number of periods until peak.

Arguments

delta

The estimate of \(\delta\), the level of \(\ln g\).

gamma

The estimate of \(\gamma\), the slope of \(\ln g\).

Examples

Run this code
# Forecasts the peak of an epidemic with gamma < 0 so that a peak is in
# sight.
forecast.peak(-2.87,-0.045)

# Does not return a result (returns an error as gamma > 0)
try(forecast.peak(-2.87,0.045), silent=TRUE)

Run the code above in your browser using DataLab