Page 1 of 2
Decomposing shocks using State Space models
Posted: Wed Jun 08, 2011 3:15 pm
by nectar
Dear all,
Can you please suggest if the following code is correct? I am trying to use a simple state space model to decompose structural shock generated using SVAR into a region-specific shock and a country-specific shock. This is a case of supply shock in a two-country setting. Here is my code:
Code: Select all
@signal sup1 = c(1)*s1+s2+[var=exp(c(2))]
@signal sup2 = c(3)*s1+s3+[var=exp(c(4))]
@state s1=[var=1]
@state s2=[var=exp(c(5))]
@state s3=[var=exp(c(6))]
param c(1) .0 c(2) .0 c(3) .0 c(4) .0 c(5) .0 c(6) .0
s1 is the region-specific shock which is common in both countries. s2 is the country specific shock for the first country, and s3 for the second country. I only have pure noise specification for the country specific shocks.
Estimating the model is consistently giving this message ''WARNING: Singular covariance - coefficients are not unique.'' Moreover, when I chose Proc/Make Model, I keep getting syntax error message.
Any suggestion would be highly appreciated!
Re: Decomposing shocks using State Space models
Posted: Thu Jun 09, 2011 7:13 am
by trubador
I believe the warning message is quite correct. Your model is excessively flexible and makes it extremely difficult to obtain unique coefficient estimates. I do not think you can successfully estimate the common component, since model seems to be ill-defined.
Re: Decomposing shocks using State Space models
Posted: Thu Jun 09, 2011 8:13 am
by nectar
Thank you. Can you please suggest where I have made mistake in specifying the following set of equations?
Code: Select all
[sup1=[a1 1 0][s1]
[sup2=[a2 0 1][s2]
[s3]
And, the eviews code I have is:
@signal sup1 = c(1)*s1+s2+[var=exp(c(2))]
@signal sup2 = c(3)*s1+s3+[var=exp(c(4))]
where the supply shock of country 1 is decomposed into the region-specific shock (s1), and the country-specific shock (s2), and similarly for country 2. The unobservable components have following specification (for state equation):
Code: Select all
[s1]=[1 0 0][e0]
[s2]=[0 1 0][e1]
[s3]=[0 0 1][e2]
again, the eviews code is:
@state s1=[var=1]
@state s2=[var=exp(c(5))]
@state s3=[var=exp(c(6))]
and the error distribution is as follows:
Code: Select all
E(ee') = [1 0 0]
= [0 x 0]
= [0 0 y]
Therefore the transition equations only have white noise specification with the variance of the common shock set to 1, and the variance of country-specific shocks (x and y) is to be estimated.
Please note that this is the specification in Chaime et al. (1994) and Xu (2006) used in decomposing SVAR shocks into a common component and idiosyncratic components.
Thank you again, and I look forward to your suggestion.
Re: Decomposing shocks using State Space models
Posted: Thu Jun 09, 2011 10:59 am
by EViews Glenn
You need to remove the error variances from the signal equations, or equivalently, remove states s2 and s3. You've doubled-up on the specific innovations. But even that might not be enough...
Re: Decomposing shocks using State Space models
Posted: Thu Jun 09, 2011 12:37 pm
by nectar
Thanks, Glenn! I have corrected it now and tried several other specifications to get the decomposition. And it is still giving me the Singular Covariance warning. Do you have any other suggestion, especially related to decomposition (any reference to past discussions in this forum related to this)?
Re: Decomposing shocks using State Space models
Posted: Thu Jun 09, 2011 2:40 pm
by EViews Glenn
There needs to be something more to the specification in the previous papers, because as trubador notes, your specification as written is not really identified.
What your spec is saying that that your first variable has variance
v1 = a + b
and your second has variance
v2 = a + c
For any choice of underlying variance, I have an infinite number of choices for a, b, c. Suppose, for example that you set v1 = 10 and v2 = 20, and that you choose a = 5, b = 5, c = 15. I could just as easily set a = 2, b = 13, c = 18, etc...
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 12:27 pm
by nectar
HI Glenn:
Sorry for the late response. I have attached a portion of the previous paper that I noted earlier. I am trying to replicate this for different countries. Please let me know where I made mistake in specifying these equations (in my codes posted previously), and can you suggest correction also.

- xu.jpg (69.01 KiB) Viewed 12462 times
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 1:11 pm
by EViews Glenn
There should be no errors in your signal equations.
Code: Select all
@signal sup1 = c(1)*s1+s2
@signal sup2 = c(3)*s1+s3
@state s1=[var=1]
@state s2=[var=exp(c(5))]
@state s3=[var=exp(c(6))]
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 1:50 pm
by nectar
Thank you again, Glenn!
I had already tried the specification that you offered. I tried again and have attached the workfile. The problem persists. Can you please suggest if anything can be done?
Best,
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 2:19 pm
by startz
The problem is, as Glenn said earlier, that the parameters aren't identified. This may be an error in the original article. However, it appears that the original author only cared about the ratio of common to regional variance, alpha^1/(alpha^1+P), which is identified.
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 2:57 pm
by nectar
There are several other papers which has taken this very approach and haven't reported anything different. So I am wondering where the error might be.
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 3:11 pm
by startz
The original article doesn't report estimates of alpha or P. I'm fairly sure that's because they can't be found.
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 3:41 pm
by nectar
In table 5a of the article, the author reports share of common shock using the alpha^1 and P1, which are parameters that were estimated using State Space model.
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 3:47 pm
by startz
But he doesn't report the individual parameters, does he? Just the share? The problem is that you're trying to estimate the individual parameters.
Re: Decomposing shocks using State Space models
Posted: Tue Jun 14, 2011 4:49 pm
by nectar
But how can he report share without estimating the individual parameters? Is there a way to do that?