Interface for irf matching
I would like to add matched_irfs
and matched_irfs_weights
blocks to Dynare's preprocessor, the blocks should be similar to irf_calibration
. I tried for several hours to implement this but I failed miserably, so I would appreciate any help (@sebastien).
What I have in mind is the following:
matched_irfs;
y(2), eR, 0.03;
c(4), eA, 0.01;
i(1), eA, (empIrfs(3,1));
end;
This should produce a cell array in MATLAB M_.matched_irfs with the following structure:
{'y'} {'eR'} {[2]} {[0.03]}
{'c'} {'eA'} {[4]} {[0.01]}
{'i'} {'eA'} {[4]} {[empIrfs(3,1)]}
where empIrfs is a matrix that has the empirical IRF values. So I want to be able to either manually provide the values or access them from a matrix in the workspace.
Similarly, I would like to have a matched_irfs_weights
block to specify the weighting matrix:
matched_irfs_weights;
y(2), eR, y(2), eR, 20;
c(4), eA, c(4), eA, (1/empIrfsCov(3,3));
i(1), eA, y(2), eR, 10;
end;
where empIrfsCov is the covariance matrix of the empirical IRFs. This should produce a cell array in MATLAB M_.matched_irfs_weights
with the following structure:
{'y'} {'eR'} {[2]} {'y'} {'eR'} {[2]} {[20]}
{'c'} {'eA'} {[4]} {'c'} {'eA'} {[4]} {[(1/empIrfsCov(3,3))]}
{'i'} {'eA'} {[4]} {'y'} {'eR'} {[2]} {[10]}
I will then manipulate the structure in the MATLAB code.
Again, I'm very sorry, I thought this would be very easy to implement; but even with the help of ChatGPT I was not able to get this running as I don't know any C++.
Of course, this is just a proposal for an interface, but I think we should stay close to what we already have (irf_calibration) and not do some fancy other interface like y(2,eR)=20
or similar.