5.5 Compare moving average trends for fable and forecast
Finding: R-package ‘forecast’ has a more stable download trend comparing to ‘fable.’ When ‘fable’ gets updated, its downloads peaked, while ‘forecast’ suffers a dropping, on the contrast.
As stated in the previous section, the earlier an R-package is released, the easier it can be to get a relatively higher total downloads. But that doesn’t mean a better growth will exist. Due to that, in this section, we compared package fable
and forecast
. They are two closely related R-packages, for fable
is the later released tidy version of forecast
. And in this way, we can approximately fix all of factors, except the initial release date, so that we can compare the growth and changes of those two more clearly.
Figure 5.11 and Figure 5.12 show the daily download counts changing over the most recent 6 month period, with strong weekly seasonality. That means the downloads tend to be higher within week days and thus lower on weekends, which is consistent with trend for all of R-packages that was analyzed before.
Therefore, in order to estimate the trend-cycle and reduce the weekly seasonality, to see the changes more clearly, the Moving Average (MA) was introduced(Hyndman and Athanasopoulos 2021b).
A moving average of order m can be written as :
\[T_t = \frac1m\ \Sigma_{j = -k}^{k}y_{t+j} \]
where m=2k+1. That is, the estimate of the trend-cycle at time t is obtained by averaging values of the time series within k periods of t.
And here, we considered an equal weighed 7 moving average. It calculates the weighted average for every seven consecutive time series with the following weights : [1/7,1/7,1/7,1/7,1/7,1/7,1/7].
Figure 5.13 shows the moving average (MA) of fable
and forecast
respectively. They have quite different moving average patterns, when forecast
’s download volume is much higher than that of fable
, except for the time around New Year’s Eve, with a significant drop in forecast
. But during that time, a drop also appears in fable
, which was probably due to the big New Year holiday. In addition, the purple vertical dashed line in plot of fable
marks the update day of it, on 2021-1-29. Soon after that day, fable
’s downloads peaked, which was due to the increase brought by update day. At the same time, forecast
drops, then only gets a gentle increase.
In conclusion, the download variance of forecast
is larger than that of fable
while the former looks relatively more stable than the latter, after applying the moving average. It coincides with the conclusion of the previous section : the earlier released R-package tends to obtain more cumulative downloads. In addition, we can also see that the growths of both of two sometimes increase at the same time, while the growth of one can correspond to the decline of the other, sometimes. As for as we concerned, the shared growth may be due to their similarity. Users may download both at the same to compare, like us. And the trade-off may also be due to their similar functions, one can be replaced by the other. Finally, earlier release does not guarantee a faster growth. For example, fable
has a more dramatic growth than forecast
from 2021-01-21 to 2021-02-06.