I referred to this link and I have the following questions regarding my data. Let me start by explaining the time series that I am dealing with.
I have daily hospital data with various departments and numerous doctors working in each department. I have several years of data and my forecast horizon is for the next 365 days. My data has weekly and annual seasonality. Moreover I intend to capture the effects of holidays and Sundays in my forecasts. As a result I have not created a hierarchical time series as suggested towards the end of the link(primarily because I am not sure whether we can pass a regressor to it and more so because I do not know how many doctors I end up predicting for in each department).
The reason for this is that some doctors do not have good data(short time series or sparse data). In this case I collect these doctors and aggregate them to form something I call "OtherDocs". Typically in DeptXYZ -> Doc1 , Doc2 , Doc3 , Doc4 , Doc5 and Doc6
I could end up creating forecasts for DeptXYZ -> Doc1 , Doc3 , Doc4 , Doc6 and OtherDocs
. If OtherDocs
is still not predictable I generate a naive forecast. In this fashion I created base forecasts for every level in the hierarchy individually using arima
and passing my xreg
to it and selecting the best model on the basis of AIC.
Now, consider this example -
Total -> DeptX and DeptY
DeptX -> DocA and DocB
DeptY -> Doc1 , Doc2 and Doc3
There are cases where DocA
has a time series that starts from "2011-03-11" and ends on "2016-09-07" while DocB
has a time series that starts from "2011-05-17" and ends on "2016-09-07". Generating the base forecasts for DocA
and DocB
results in the predicted values(fit$mean
) being of a time series from "2016-09-08" to "2017-09-07". As long as the time series refers to the same dates within the Department I believe we are good to go.
In my attempt to reconcile the forecasts from each level I employed the forecasted proportions like so -
$\Largeỹ_{DocA,365} = \frac{ŷ_{DocA,365}*ŷ_{DeptX,365}}{(ŷ_{DocA,365}+ŷ_{DocB,365})*(ŷ_{DeptX,365}+ŷ_{DeptY,365})}ŷ_{Total,365}$
1. Am I doing anything wrong in the above step?
2. Suppose for one moment that the topmost level forecasted values do not capture the low points of data in the case of Holidays and Sundays. Does that intuitively mean that revised forecasts for DocA might not correctly capture the same(being a proportion of $ŷ_{Total,365}$)?
Another query I have is to do with the Optimal Combination Approach -
$\Largeỹ_h = S(S′S)^{-1}S′ŷ_h$
3. I am unfamiliar with this matrix notation $S'$. Is it the inverse of $S$? Could you shed some light on this? And how do you suggest I calculate the summing up matrix in my case?(Is it absolutely necessary to proceed with the exact knowledge of the number of doctors in each department?)