IRF matching Results

I want to estimate model using IRF Matching. Model is working but parameters are not estimated. What to do? code and files attachedbuild_companionform.m (608 Bytes) IRF_matching_objective.m (1.1 KB) get_empirical_IRFs.m (5.7 KB) IRFNEW.mod (4.4 KB) finaldata.xlsx (20.7 KB)

What do you mean with

?
Note that your plot commands should be

plot(1:options_.irf,oo_.irfs.y_eetar);

Dear Professor,
Sorry I had lost the password of this ID that why text you from my old account.


Figure 1 is the calibration results. what are the results of figure 2 & 3. As, I think that figure 2 is IRF-matching results and figure 3 contains IRFs of empirical shock responses? plz comment.
one more thing, You have used code scheme in Your IRFs matching example:

figure
subplot(2,1,1)
plot(1:options_.irf,IRF_empirical(:,1),1:options_.irf,IRF_model(:,1),1:options_.irf,IRF_quantiles(1,:,1),‘r–’,1:options_.irf,IRF_quantiles(1,:,2),‘r–’);
title(‘G’)
subplot(2,1,2)
plot(1:options_.irf,IRF_empirical(:,2),1:options_.irf,IRF_model(:,2),1:options_.irf,IRF_quantiles(2,:,1),‘r–’,1:options_.irf,IRF_quantiles(2,:,2),‘r–’);
title(‘Y’)
legend(‘Empirical’,‘Model’)

Is this can apply in my model for four variables?
The values given in x-opt-hat are optimized or estimated?

Figure 2 is the empirical IRFs, which are oscillating. That is not a good sign. Figure 3 should compare empirical and model IRFs after estimation. But you screwed up the code, as outline by me previously.

The x_opt are the estimated parameters.

Thnx professor for your reply.
How can I improve figure 2. I should transform data based on your "observation equation article’??
I had used the code suggested by you and I got this result.


Then I modified your code, which you have indicate in your example. I use this code:

figure
subplot(2,2,1)
plot(1:options_.irf,IRF_empirical(:,1),1:options_.irf,IRF_model(:,1),1:options_.irf,IRF_quantiles(1,:,1),‘r–’,1:options_.irf,IRF_quantiles(1,:,2),‘r–’);
title(‘y’)
subplot(2,2,2)
plot(1:options_.irf,IRF_empirical(:,2),1:options_.irf,IRF_model(:,2),1:options_.irf,IRF_quantiles(2,:,1),‘r–’,1:options_.irf,IRF_quantiles(2,:,2),‘r–’);
title(‘pie’)
subplot(2,2,3)
plot(1:options_.irf,IRF_empirical(:,3),1:options_.irf,IRF_model(:,3),1:options_.irf,IRF_quantiles(3,:,1),‘r–’,1:options_.irf,IRF_quantiles(3,:,2),‘r–’);
title(‘rm’)
subplot(2,2,4)
plot(1:options_.irf,IRF_empirical(:,4),1:options_.irf,IRF_model(:,4),1:options_.irf,IRF_quantiles(4,:,1),‘r–’,1:options_.irf,IRF_quantiles(4,:,2),‘r–’);
title(‘rl’)
legend(‘Empirical Model’)

I am also thinking that figure 3 is not comparing empirical & model IRFs and I don’t know the reasons, although I adopt your code fully.
Sorry for long post. if x-opt are estimated parameters, then where are their standard errors in workspace?

IRFNEW.mod (5.8 KB) get_empirical_IRFs.m (5.7 KB)
These are modified codes

You need to be a lot more careful. You are using starting values for the optimization that are not in the bounds that you defined. Also, it should be

%select IRFs for matching
IRF_mat=[IRFs_point(y_pos,:)' IRFs_point(pie_pos,:)' IRFs_point(rm_pos,:)' IRFs_point(rl_pos,:)'];

instead of the strings that you currently defined.