 # Obtaining IRFs for variables not included in the Minimal-State-Variable version of a model

Hi, I am solving a model where I simplified the equations looking for the MSV version. The reason is that I wanted to avoid singularity problems (BK type) and because I want to solve several Ramsey Planner Problems using the private eq. as input, and thus, I would prefer the smallest possible system to reduce dimensionality curse issues (and again, Blanchard-Kahn issues in the planner model).

The MSV model does not have variables that I care about. Is there a fast way to obtain the IRF for this (substituted variables) from the remaining ones?

Say for example, that I substituted the output, to get rid of an equation. My model still has its components (A , H, K). Can I create the IRF for Y, operating the IRFs for (A,H,K) like this?:

y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,1);
y_IRF = y2(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf); %deviation from steady state

``````Ktemp = y_IRF(strmatch('K',M_.endo_names,'exact'),:);
Htemp = y_IRF(strmatch('H',M_.endo_names,'exact'),:);
Atemp = y_IRF(strmatch('A',M_.endo_names,'exact'),:);
``````

And then use:

`Yirf = exp(Atemp)*Htemp^(1-alphha)*Ktemp^(alphha);`

as in the longer (more equations) version of the same model?

You might want to look into `get_minimal_state_representation.m` (https://git.dynare.org/Dynare/dynare/-/blob/master/matlab/get_minimal_state_representation.m) which we use to derive the identification check of Komunjer and Ng (2011). Additionally, these two test mod files (https://git.dynare.org/Dynare/dynare/-/tree/master/tests/minimal_state_space_system) might also help you as they deal with the minimal state space system and check whether the theoretical moments for all variables computed either from the full state vector or the minimal one are the same.

So if you have the transition equation for your minimal state representation you should also have a matrix mapping your minimal states to all other variables. You need, however, then to write your own function to generate the IRFs or adapt a copy of simult_.