jpfeifer wrote:If you want to only consider the effect of the shock B ordered last, you need to purge the residual of that equation from the effect of shock A that affects both equations.
Say the observed residuals are given by
[res_1; res_2]=[A;B]*R
where R is the upper Cholesky matrix. Then you can back out the shocks A and B by postmultiplying the left hand side by R^{-1}.
Dear Johannes,
Could I ask you further on this? Could you please take a look at the following example?
- Code: Select all
var Gov, Tfp;
varexo g, z;
parameters rho;
rho = 0.95;
model;
Gov = rho*Gov(-1) + g;
Tfp = rho*Tfp(-1) + z;
end;
shocks;
var g; stderr 0.0039;
var z; stderr 0.0086;
corr e, u = 0.3868;
end;
stoch_simul(order=1);
The innovation g and z are correlated with correlation=0.4
Then the covariance matrix is A=[0.0039^2 0.0039*0.0086*0.3868; 0.0039*0.0086*0.3868 0.0086^2];
R=chol(A)
inv(R)=[ 256.4103 -107.5509; 0 126.0937]
[obs_g;obs_z]=[g;z]*R
So I need use the observed smoothed innovations timing inv(R) to back out [g;z].
However, you see, inv(R) has very large scale, will this generate any problem since [g;z] then will have much different scale from smoothed ones?
Many thanks!
Kind regards,
Huan