Forecasting with `midasr` package: Inclusion of new high-frequency value

前端 未结 1 686
感动是毒
感动是毒 2021-02-06 11:32

I am trying to calculate one-step-ahead forecasts using the so called MIDAS concept. Within this concept one calculates forecasts in dependence of a higher-frequency data. For e

相关标签:
1条回答
  • 2021-02-06 11:45

    I am not sure that I understood your question correctly so I will give an example which I hope will answer your question.

    Suppose your response variable y is observed at a yearly frequency and the predictor variable x is observed quarterly (which corresponds to the simulated data). Say you are interested in forecasting next year y value using the data from the previous year. Then the model equation in the pacakge midasr is the following:

    y~mls(x,4:7,4)
    

    The values 4:7 are the lags of x used for prediction and 4 indicates that there are 4 observations of x for every observation of y.

    The package midasr uses the convention, that for low frequency period t=l we observe high frequency periods m*(l-1)+1:m. So for year 1 we have the quarters 1,2,3,4, for year 2 we have the quarters 5,6,7,8. This convention then assumes that we observe y at year 1 together with the 4 quarter of x, y at year 2 together with quarter 8 of x and etc.

    The MIDAS model is formulated in terms of lags, which start at zero. So if we want to explain y at year 1 (as in our example the low frequency is the yearly frequency) with the values of x from the same year, i.e. quarters 4,3,2,1 we use the lags 0,1,2,3. If our goal is to explain y at year 2 with values of x at year 1 the we use lags 4,5,6,7 which correspond to quarters 4,3,2,1.

    Now assume the we are at year 3, but we have not observed yet the y value, but we have already observed the first quarter of the year 3, i.e., the quarter 9. Suppose we want to use this information for forecasting. Quarter 9 is three high frequency lags behind the the year 3, hence the model specification is now

    y~mls(x,3:7,4)
    

    where we also include all the information about the previous year too.

    So if my example corresponds to what you are asking, then yes, inclusion of the new high frequency observation is only a matter of changing value of from argument the way you did. However I strongly suggest to start with one simple model to fully grasp the way the package works.

    0 讨论(0)
提交回复
热议问题