Page 2 of 3
Re: Matheson-Stavrev EL 2013
Posted: Tue Jul 18, 2017 5:31 am
by bok1234
Dear Mr.Clark and Mr.Doan,
Thank you very much for your valuable advice.
I already have several countries' 1 to 10 year inflation expectations series from Consensus Economics, and decided to use '6 to 10 year average' and '1 to 10 year average' series based on your advice. By the way, I found that some country's '10 year series' is just same to '6 to 10 year average series'. So I am not very sure whether those data generated by the Consensus Economics are very creditworthy or not. Of course, I do not have many option without the company data...
Re: Matheson-Stavrev EL 2013
Posted: Tue Jul 18, 2017 9:03 am
by bok1234
Dear Mr.Doan,
2 questions.
(1) Trial and Error Method
I truncated the data set (making starting point more recent), and adjusted DLM starting point in Do Loop (making its starting point 3 quarter later than 'data set starting point'). Finally, I changed CONDITION (DLM option) repeatedly from 1 to 12 to estimate the model.
There was few error message (## MAT15. Subscripts Too Large or Non-Positive) and some of them seem to be significant considering theoretical signals and confidence intervals. By the way, do you think that this kind of DLM option fixing is methodologically acceptable?
(2) Regression Results
In regression output window 'independent variables' coefficients' are not statistically significant. Howerver, I guess that just like VAR analysis, time varying coefficients' signals, trends, or locations in confidence intervals are more important. I want to know your expert opinion.
Re: Matheson-Stavrev EL 2013
Posted: Tue Jul 18, 2017 10:40 am
by TomDoan
bok1234 wrote:Dear Mr.Doan,
2 questions.
(1) Trial and Error Method
I truncated the data set (making starting point more recent), and adjusted DLM starting point in Do Loop (making its starting point 3 quarter later than 'data set starting point'). Finally, I changed CONDITION (DLM option) repeatedly from 1 to 12 to estimate the model.
There was few error message (## MAT15. Subscripts Too Large or Non-Positive) and some of them seem to be significant considering theoretical signals and confidence intervals. By the way, do you think that this kind of DLM option fixing is methodologically acceptable?
You need to figure out what the problem is and fix it. Regarding the conditioning, it's certainly acceptable to leave off early entries in a TVC model where there really is no good information until you've seen enough data points to figure out the regression slopes---in the VAR literature, it's common to use perhaps half the sample for "training", so compared to that conditioning on 10 isn't all that many.
bok1234 wrote:
(2) Regression Results
In regression output window 'independent variables' coefficients' are not statistically significant. Howerver, I guess that just like VAR analysis, time varying coefficients' signals, trends, or locations in confidence intervals are more important. I want to know your expert opinion.
This is an area where so far as I know, no one has yet to come up with a model which actually gets out more than is put in using restrictions of one type or another. In the case of (for instance) Laubach and Williams, the restrictions that seem to produce a "reasonable" result for one data range produces nonsense over a different range. And that's with data for a single country. The tuning that works with a model like this for U.S. data may fail spectacularly for another country.
Re: Matheson-Stavrev EL 2013
Posted: Fri Jul 21, 2017 1:07 am
by bok1234
Dear Mr.Doan,
In this model, CONDITION option in DLM should be same to both 'TYPE =SMOOTH' and 'TYPE=FILTER'?
I am asking because the significant (or meaningful or reasonable) result of 'TYPE=FILTER' got to be atrocious one in case of 'TYPE =SMOOTH' when I imput same CONDITION option (e.g. CONDITION = 2 to both types).
Re: Matheson-Stavrev EL 2013
Posted: Fri Jul 21, 2017 7:45 am
by TomDoan
CONDITION only affects the calculation of the log likelihood---it has no direct effect on either the smoothed or filtered results, only indirectly as it changes the estimated parameters.
Re: Matheson-Stavrev EL 2013
Posted: Fri Jul 21, 2017 3:20 pm
by bok1234
Another circumlocution to make me study more. So, does it mean OK that I input CONDITION = 2 for filtering and CONDITION = 4 for smoothing, for example?
Re: Matheson-Stavrev EL 2013
Posted: Fri Jul 21, 2017 5:20 pm
by TomDoan
I'm not sure what the point of that would be, but again, it matters only when you are estimating the parameters (that is some METHOD option other than METHOD=SOLVE is being used).
Re: Matheson-Stavrev EL 2013
Posted: Fri Jul 21, 2017 5:52 pm
by bok1234
OK. I'd better handle METHOD options.
In estimating time varying coefficients by Kalman Fitering, both 'filtered' result and 'smoothed' result should be reported simultaneous? Matheson & Stavrev reported both but I think it is not easy to get good estimation for both. I guess that it depends on the research purpose. For example, I think that Kalman smoothing could be the more meaningful estimation than filtering if I should choose one between smoothing and filtering for finding out 'anchoring degree' or 'Phillips curve slope' for last 30 years. I want to hear Mr.Doan's opinion.
Re: Matheson-Stavrev EL 2013
Posted: Sat Jul 22, 2017 3:38 pm
by TomDoan
Yes, it would depend upon your research purposes. In science and engineering, filtering is the king since they're usually interested in real-time prediction and control. (You really don't want a self-driving car to decide that it really should have done something different two minutes ago). In economics, smoothing tends to be more important. In this case, I'm not sure there's much value added to the filtered results.
Note, BTW, that they impose a lot of restrictions on the estimated parameters (some documented, some not). For instance, rho<=.95 (prevents it from crossing over unit root and eliminating the distinction between the NAIRU and the gap) and both >=0 and <=some value on the drift variances. They have a somewhat poorly motivated choice for the upper bound on the drift variances (the variance of the change in 40 period rolling regressions---why 40 when you would get a different bound if you did 30 or 50?).
Re: Matheson-Stavrev EL 2013
Posted: Mon Jul 24, 2017 11:05 pm
by bok1234
Dear Mr.Doan,
I attached the code, dataset, and resulf (pdf) of some country’s case.
(1) Considering the scales of theta, kappa, and gamma (RHS), the horizontal lines of 3 coefficients (LHS) are just natural. But I am not confident of the result - I have never seen this kind of Kalman smoothed results are reported elsewhere. Can I accept and use this as my test result or should I change some options such as SOLVE, etc.?
(2) Let’s suppose that the test is rightly-done and I should analyze the result (pdf). Theta and kappa lie between the confidence interval of each and their confidence intervals do not involve zero. In case of gamma, it stays within the C.I. but does involve zero in every date point. So, can I say that theta and kappa are significant by 5% criteria but gamma is not?
Re: Matheson-Stavrev EL 2013
Posted: Tue Jul 25, 2017 9:20 am
by TomDoan
It's estimating the drift variances on all three "regression" coefficients to be zero, that is, instead of being time-varying, they are fixed (as it is in most similar models done before this one). When you smooth a fixed coefficients model, you get flat estimates with flat error bands. (The variances are estimated as (effectively) round-off error, thus non-zero, but very very small, so the coefficients have very very small, but not actually zero, changes).
Re: Matheson-Stavrev EL 2013
Posted: Tue Jul 25, 2017 7:20 pm
by bok1234
In summary of your words, when trying to estimate time-varying coefficients, I got the fixed coefficient results. Then, can I use these results as 'smoothed Kalman filter output' or not? I hope so but I might not because the estimates generated through this model under given conditions are really fixed, not time-varying. In other words I might be doing money business because the reality is fixed but I had supposed it is time-varying...
Another country's case is a little different - its theta and gamma are time varying but kappa is fixed. Please let me know whether I can use them as 'smoothed Kalman filter output' or not.
Or can I use only 2 coefficients (theta and gamma) as a 'smoothed Kalman filter output'?
Re: Matheson-Stavrev EL 2013
Posted: Tue Jul 25, 2017 10:24 pm
by TomDoan
I'm not really sure what to say. If the time variation has a zero drift variance, then you have fixed coefficients. When you smooth a fixed coefficients model, the result is dead flat. That's just what it is. Whether you want to graph three parallel lines and present them as the Kalman smoothed results is up to you---seems like a waste of paper to me. They are the Kalman smoothed results, they just aren't interesting as graphs.
Re: Matheson-Stavrev EL 2013
Posted: Wed Aug 02, 2017 6:06 pm
by TomDoan
This is a further refined program for doing the unconstrained EKF. This uses a fixed data set rather than using FRED (it was generated using FRED, but won't change with revisions). It also generates many of the graphs in the original paper.
- msgraphs.src
- Graphics generator source file
- (3.33 KiB) Downloaded 986 times
- mscolors.txt
- Graphics color file (to get thick and thin reds and blues)
- (137 Bytes) Downloaded 896 times
Re: Matheson-Stavrev EL 2013
Posted: Tue Aug 08, 2017 1:31 am
by bok1234
Thank you, Mr.Doan. I have not found this new version until this afternoon.
I am still working on it. Let me ask you sever questions about the model (the attached file).
1. I rewrite the equations in the type of reduced form in the attached file. In the reduced form, theta, anchoring coefficient, shows eventually the relationship between 'real inflation (headline CPI inflation)' and 'long-run inflation expectations' . So, can I say that the anchoring coefficient of this paper means how significantly 'long-run inflation expectations' affects 'real inflation', not 'weighted average inflation expectations'? This could sounds very natural or silly but the authors did not define 'anchoring', so I ask you.
2. Can I think that your code is for one reduced form equation with time varying coefficients?
3. State equations includes 4 varibles - kappa, theta, gamma, and u-u*. Unlike others which are estimated in the equations, u-u* is given exogenously - u* is hp filtered u. Is this OK, I mean, don't we have to estimate u* 'in the model'?