mpiktas / midasr

R package for mixed frequency time series data analysis.
http://mpiktas.github.io/midasr/
Other
73 stars 34 forks source link

Thanks for your reply! #48

Closed zhouxiandong closed 7 years ago

zhouxiandong commented 7 years ago

Thanks for your reply! As you say, i.e eq.r<-midas_r(y ~ trend + mls(x, 0:7, 4, nealmon) , start = list(x = c(1, -0.5,))) in this midas_r(), is the nealmon of x equal to nealmon(q=c(1,-0.5),2) ? Any more, you say "The summary method for midas_r returns the coefficients of MIDAS restriction. The starting values for x and for z tells midas_r to use exponential polynomials of order 1 and 2 respectively, hence you get the corresponding coefficients (the first coefficient is the multiplier)". I know the first coefficient is the multiplier of the "eq.r$midas_coefficients", but what the other coefficients mean? Also in the result of coef(eq.r), the first coefficient is the multiplier of the "eq.r$midas_coefficients",but I don't understand what the other coefficients represent respectively.

vzemlys commented 7 years ago

Please comment on the original issue, do not open a new one.

Yes nealmon of x is equal to nealmon(c(1,-0.5),2). But note these are the starting values for optimisation, not the actual estimated MIDAS parameters. It is actually explained very clearly in the page 14 of JSS article, the exact formulas, etc.

For MIDAS model there are two set of coefficients, the first one are the coefficients of the functional form of MIDAS restrictions. These are returned by function coef. The second set of coefficients are the coefficents which are the values of the functional forms. These are returned by coef(x,midas=TRUE). Every MIDAS model can be written in matrix form:

$$Y=Xf(\theta)$$,

coef returns the $\theta$, coef(midas=TRUE) returns f(\theta).

zhouxiandong commented 7 years ago

Thank you very much!