Page 1 of 1

shock decomposition with missing values or mixed freq data

PostPosted: Fri Mar 20, 2015 4:56 pm
by da20
Hi, Does anyone know a reference that explains what dynare does when computing a shock decomposition with some missing data points?
I'm working with mixed frequency data and I would like to know what dynare is doing to extract the shocks in those periods in which I have fewer data points than shocks.
Thanks in advance !

Re: shock decomposition with missing values or mixed freq da

PostPosted: Sat Mar 21, 2015 3:16 pm
by jpfeifer
See the manual for the treatment of missing observations in the Kalman filter setup. They are essentially treated as unobserved states and are inferred given the other states. Conditional on having the best estimate of the states given the observables in each period, the shock decomposition can proceed as usual.
I don't understand the
in those periods in which I have fewer data points than shocks

part. The restriction is that you cannot have more observables than shocks as the would result in stochastic singularity. But there is no restriction for having fewer observables than shocks.

Re: shock decomposition with missing values or mixed freq da

PostPosted: Fri Mar 27, 2015 7:32 pm
by da20
Thank you very much for he response, it was very useful. I'm sorry for not being very clear.
What dynare does to get the shocks given some observables Y_t and some states X_t-1 is to solve a simple system in which the unknowns are the shocks e_t:

Y_t = A X_t-1 + B e_t

where A and B are matrices. Of course, when we have all the observations at time t (Y_t does not have any missing value) the problem is simply to invert matrices (assuming we have the same number of observables and shocks).
On the other hand, when we have a missing observation in Y_t, we have more shocks than observables so we basically have a subspace of shocks satisfying the system. My question was simply, what does dynare do in these cases? What is the method to pick the shocks that end up appearing in the shock_decomposition results? Thanks !

Re: shock decomposition with missing values or mixed freq da

PostPosted: Sat Mar 28, 2015 7:57 am
by jpfeifer
Sidenote: Your statement is only true if you know the initial value of states X_0. Otherwise, you cannot do a simple inversion.

Again, the answer is: it uses the Kalman filter (see e.g. Hamilton 1994: Time Series Analysis)
When there are missing values or more shocks than observables, it still holds that
Code: Select all
Y_t = A X_t-1 + B e_t

or
Code: Select all
Y_t-A X_t-1=B e_t

That is, the residual on the LHS follows a multivariate normal distribution. You can think about the solution being the "maximum likelihood estimate". For example, say that the residual for a variable is 2 and it is driven by two uncorrelated standard normal shocks. Then the solution should be that both shocks take on the value 1 as this is the most likely linear combination giving rise to a residual of 2. Another "solution" would be having one shock being 2 and the other being 0. But this is less likely:

normpdf(2)+normpdf(0)= 0.4529
normpdf(1)+normpdf(1)= 0.4839

Re: shock decomposition with missing values or mixed freq da

PostPosted: Sun Mar 29, 2015 6:22 pm
by da20
Thank you very much.