I am trying to estimate time varying parameters by the following equation form:
signal equation
yt = xtβt + ztAt + et et ∼ N(0, R)
state equation
βt = βt−1 + vt vt ∼ N(0, Q)
At = At−1 + wt wt ∼ N(0, H)
my questions are
1) First, I would like to allow all parameters to vary over time (says B and A). After that, if the result turn out that any parameter (say A) is not significantly vary over time, I will adjust the model to allow time varying only on another parameters (say B). How and where can I see from the result given by Eviews that the time-varying is significant?
2) Since I would like to find the time-varying series of the coefficients, could you suggest me how to get the series? To be more specific, in this case, if both A and B are significantly vary over time, how to get the series of A and B?
Actually, I have read the manual for Eviews6 which is the version I used, I think that I may get the series from proc/make state series/filters:state estimate OR smoothed:state estimates. Is it the correct way to get the series?
Thank you very much in advance for your answer.
state space model for time varying parameters
Moderators: EViews Gareth, EViews Moderator
Re: state space model for time varying parameters
It depends on the context, but smoothed estimates would be fine in your context. If you also save "state estimate SEs", you can use them to build confidence intervals. View/State views/Graph State Series will also be helpful for visual inspection.
Re: state space model for time varying parameters
thank you very much for your answer, Trubador.
However, do you have any suggestion for my first question?
I tried to run the model and the state series are not so different across time so now I'm not quite sure whether I should use time varying for these parameters.
However, do you have any suggestion for my first question?
I tried to run the model and the state series are not so different across time so now I'm not quite sure whether I should use time varying for these parameters.
Re: state space model for time varying parameters
If it is not time varying, then it is better to fix it.
Re: state space model for time varying parameters
Thanks Trubador.
Let me ask more questions.
To be more specific, here is the result I got from the following model.
@signal X = sv1*A + sv2*B + sv3*C + sv4*D + [var = exp(c(1))]
@state sv1 = sv1(-1)
@state sv2 = sv2(-1)
@state sv3 = sv3(-1)
@state sv4 = sv4(-1)
Do you have any suggestion since the results look not correct in my opinion.
And will adding the variance in state equations change the results?
when I try to add variance for the state equations as
@state sv1 = sv1(-1) + [var = exp(c(2))]
@state sv2 = sv2(-1) + [var = exp(c(3))]
@state sv3 = sv3(-1) + [var = exp(c(4))]
@state sv4 = sv4(-1) + [var = exp(c(5))]
it report the error that "WARNING: Singular covariance - coefficients are not unique."
again, this is Eviews6 version.
Let me ask more questions.
To be more specific, here is the result I got from the following model.
@signal X = sv1*A + sv2*B + sv3*C + sv4*D + [var = exp(c(1))]
@state sv1 = sv1(-1)
@state sv2 = sv2(-1)
@state sv3 = sv3(-1)
@state sv4 = sv4(-1)
Do you have any suggestion since the results look not correct in my opinion.
And will adding the variance in state equations change the results?
when I try to add variance for the state equations as
@state sv1 = sv1(-1) + [var = exp(c(2))]
@state sv2 = sv2(-1) + [var = exp(c(3))]
@state sv3 = sv3(-1) + [var = exp(c(4))]
@state sv4 = sv4(-1) + [var = exp(c(5))]
it report the error that "WARNING: Singular covariance - coefficients are not unique."
again, this is Eviews6 version.
Last edited by kaner on Fri Mar 27, 2015 1:39 am, edited 1 time in total.
Re: state space model for time varying parameters
and one more question:
what is the reason for this message in the estimation output of sspace and how to solve it?
"Failure to improve Likelihood after 1 iteration"
Thank you very much in advance for your help.
what is the reason for this message in the estimation output of sspace and how to solve it?
"Failure to improve Likelihood after 1 iteration"
Thank you very much in advance for your help.
Re: state space model for time varying parameters
There is nothing wrong with the model. It is simply a fixed parameter model and is no different than its OLS counterpart:To be more specific, here is the result I got from the following model.@signal X = sv1*A + sv2*B + sv3*C + sv4*D + [var = exp(c(1))]@state sv1 = sv1(-1)@state sv2 = sv2(-1)@state sv3 = sv3(-1)@state sv4 = sv4(-1)Do you have any suggestion since the results look not correct in my opinion.
Code: Select all
wfcreate u 200
series x = nrnd
series y = 3*x + nrnd
equation eq.ls y x
scalar var = 2*log(eq.@se)
line eq.@coef(1) eq.@coef(1)+2*eq.@stderrs(1) eq.@coef(1)-2*eq.@stderrs(1)
sspace ss
ss.append @signal y = sv1*x + [var = exp(c(1))]
ss.append @state sv1 = sv1(-1)
ss.append param c(1) .0 c(2) .0
ss.ml
ss.stategraphs(t=smooth)Of course it will change the results, as you are now estimating a completely different model. In this one, you allow parameters change over time. If they are in fact time invariant, then the estimation results will produce very high negative values for coefficients c(2), c(3), c(4) and c(5) forcing the variance to zero. And it may also lead to convergence problems.And will adding the variance in state equations change the results? when I try to add variance for the state equations as@state sv1 = sv1(-1) + [var = exp(c(2))]@state sv2 = sv2(-1) + [var = exp(c(3))]@state sv3 = sv3(-1) + [var = exp(c(4))]@state sv4 = sv4(-1) + [var = exp(c(5))]
There are plenty of models and discussions in the forum regarding the state space estimation. Please do a search for more details.what is the reason for this message in the estimation output of sspace and how to solve it?"Failure to improve Likelihood after 1 iteration"
Re: state space model for time varying parameters
Thank you so much, Trubador. It is more clear to me now.
However, I still get the warning of singular covariance. I tried to search for the solution in this forum and found that adding
initial values might solve this problem.
But even I add initial value for state variance, it still cannot be solved.
Could you please check my workfile so that you can suggest me what is the major mistake I have to adjust?
Thank you very much in advance for your suggestion.
However, I still get the warning of singular covariance. I tried to search for the solution in this forum and found that adding
initial values might solve this problem.
But even I add initial value for state variance, it still cannot be solved.
Could you please check my workfile so that you can suggest me what is the major mistake I have to adjust?
Thank you very much in advance for your suggestion.
- Attachments
-
- sspace_1.wf1
- (18.77 KiB) Downloaded 580 times
Re: state space model for time varying parameters
State space models are not like their OLS counterparts. They are very flexible and therefore require well defined models. You cannot expect them to work smoothly and produce a feasible output each time you run the model. They do not operate like OLS models. As for your model:
1) There are 10 parameters that need to be estimated, but you have only 60 observations. Usually, small samples are problematic for such flexible and complicated models.
2) You have no evidence that supports the time variation in the parameters to begin with.
3) OLS estimates indicate that some of the coefficients are not even significant.
4) State space estimates indicate that half of the variance estimates are practically zero, which also lead to "singular covariance" problem.
There have been plenty of discussions in the forum regarding these very same problems. Your case is not really not an exception. This is an ill-defined model and needs to be revised. For instance, you can begin with a model that has only one time-varying parameter and then increase that number at each step. You can also try different specifications other than random walk.
If you need further help, you can refer to a textbook.
1) There are 10 parameters that need to be estimated, but you have only 60 observations. Usually, small samples are problematic for such flexible and complicated models.
2) You have no evidence that supports the time variation in the parameters to begin with.
3) OLS estimates indicate that some of the coefficients are not even significant.
4) State space estimates indicate that half of the variance estimates are practically zero, which also lead to "singular covariance" problem.
There have been plenty of discussions in the forum regarding these very same problems. Your case is not really not an exception. This is an ill-defined model and needs to be revised. For instance, you can begin with a model that has only one time-varying parameter and then increase that number at each step. You can also try different specifications other than random walk.
If you need further help, you can refer to a textbook.
Re: state space model for time varying parameters
Thank you very much, trubador.
I tried according to your suggestion by
1) excluding the insignificant variables (from OLS result)
2) using only one or two time-varying parameters
and get the following code:
The warning of singular covariance problem did disappear!!
However, I have more questions regarding the result. I got the state series as attached, but the variance of error term of state equation is quite low (c(5) = -5.32577). Therefore, could you please clarify more about your previous suggestion "2) You have no evidence that supports the time variation in the parameters to begin with."
I wonder that is the variance is too low or not? and is there any other criteria to determine that the parameter is time-varying?
Thank you very much in advance for your help.
I tried according to your suggestion by
1) excluding the insignificant variables (from OLS result)
2) using only one or two time-varying parameters
and get the following code:
Code: Select all
@signal dlpm = sv1*dlneer + sv2*dlneer(1) + c(2)*dlbrent + c(3)*ygap(1) + [ename=e1, var = exp(c(4))]
@state sv1 = sv1(1) + [ename=e2, var = exp(c(5))]
@state sv2 = sv2(1) + [ename=e3, var = exp(c(6))]
@vprior svar02However, I have more questions regarding the result. I got the state series as attached, but the variance of error term of state equation is quite low (c(5) = -5.32577). Therefore, could you please clarify more about your previous suggestion "2) You have no evidence that supports the time variation in the parameters to begin with."
I wonder that is the variance is too low or not? and is there any other criteria to determine that the parameter is time-varying?
Thank you very much in advance for your help.
Re: state space model for time varying parameters
Initializing the state variance matrix is a tricky business. It should be the last thing to do. Try other remedies and see if any one works.But even I add initial value for state variance, it still cannot be solved.
Actually, the estimated variance is exp(c(5)). Of course it would depend on the scale of the variable, but for high negative values, say 20, it is practically zero indicating no variance for that coefficient.I got the state series as attached, but the variance of error term of state equation is quite low (c(5) = -5.32577).
You already did an OLS estimation. You can check for recursive coefficient estimates.is there any other criteria to determine that the parameter is time-varying?
Look carefully at the chart. Although it appears to be time varying, the confidence interval is too wide making the estimates insignificant at all.
Re: state space model for time varying parameters
Thank you very much trubador :)
Re: state space model for time varying parameters
Hello, trubador
I would like to clarify one more thing.
Is my understanding correct that the smoothed series from state space model in eviews come from utilization of Kalman filter?
what is the proc/make kalman filter for?
I would like to clarify one more thing.
Is my understanding correct that the smoothed series from state space model in eviews come from utilization of Kalman filter?
what is the proc/make kalman filter for?
Who is online
Users browsing this forum: No registered users and 2 guests
