0
$\begingroup$

I am trying to forecast the number of confirmed cases for several days (1, 3, a week) of a virus with the following data:

  Province       Date Confirmed_Cases virus fever Wuhan_Pneumonia temp wuhan sars
1   Anhui 2020-01-21               0    30     0              21    6    56   71
2   Anhui 2020-01-22               0    73     0              40    7    47    0
3   Anhui 2020-01-23               0    61     0              22   10    89   50
4   Anhui 2020-01-24               6     0     0              24    6    65  100
5   Anhui 2020-01-25              24   100     0             100    7    98   51
6   Anhui 2020-01-26              45    47    86              60    0    67   35

Note: This is a truncated version of the data. The actual dataset has 20 Provinces with only 23 daily observations for each province (the dates match up).

My issue is that I'm not sure how to tackle this issue since there are only 23 observations for each province. My intuition is to create a time series object and then create an ARIMA model to forecast on, but simply creating the time series object is proving to be a challenge due to the small number of observations. The following is what I have done (but seems to not be working):

myts <- ts(dta, 
           start = as.numeric(format(dta$Date[1], "%j")),
           frequency = 30)

However, when I do this, my data gets messed up and I get the following:

Time Series:
Start = 21 
End = 227 
Frequency = 1 
    Provice  Date Confirmed.cases virus fever Wuhan_Pneumonia temp wuhan sars
 21       1 18282               0    30     0              21    6    56   71
 22       1 18283               0    73     0              40    7    47    0
 23       1 18284               0    61     0              22   10    89   50
 24       1 18285               6     0     0              24    6    65  100
 25       1 18286              24   100     0             100    7    98   51
 26       1 18287              45    47    86              60    0    67   35

Am I approaching this problem correctly? If not, can somebody please provide some insight/tips as to how to go about doing this?

$\endgroup$
  • $\begingroup$ The possibility that any forecasting method can be successful relies fundamentally on the hope that the future will look like the past. It will at some level, such as the level of physical law or biological patterns. But do you really think it is realistic to suppose that the future course of an incipient pandemic will look even remotely like early data? If so, your best bet is to understand the scientific reason for that and somehow to incorporate that science directly into your time series model. $\endgroup$ – whuber Mar 4 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.