Deterministic simulation: NAN residuals (zero pivot)
Posted: Thu Mar 16, 2017 11:45 am
Hi,
I'm trying to simulate the transition from one steady state to another.
I've followed the very helpful slides of Sebastien (attached).
Unfortuntely for steady-state changes that are large enough there is no solution (NAN in the residuals) and all the solution algorithms return an error.
The threshold for the change in steady state for which a solution exist is super small (changes in the order of 10^(-7).
I've checked that the first order solution at both steady states has no unit root. So they are both locally stable.
This is the syntax I've used
where tr_obj is a global variable that changes the steady state computed in the file GB_subsidy_TR_steadystate.m .
I've checked the .m produced out of the .mod file and it seems that the initial (y0_) and final (oo_.steady_state) are correctly associated.
The NaNs appear in the Jacobia and residual at the second iteration.
Note that my model contains a number of variables that are constant in this exercise.
Any suggestion?
I attache a zipped folder with the model if you want to reproduce the error (not it is set to run stoch_simul. Just comment this and uncomment simul.
Thanks and best
Gianni
Gianni
I'm trying to simulate the transition from one steady state to another.
I've followed the very helpful slides of Sebastien (attached).
Unfortuntely for steady-state changes that are large enough there is no solution (NAN in the residuals) and all the solution algorithms return an error.
The threshold for the change in steady state for which a solution exist is super small (changes in the order of 10^(-7).
I've checked that the first order solution at both steady states has no unit root. So they are both locally stable.
This is the syntax I've used
- Code: Select all
tr_obj_old=0;
tr_obj_new=0.00001;
global tr_obj
tr_obj=tr_obj_old;
initval;
e_trc =log(1+tr_obj);
end;
steady;
tr_obj=tr_obj_new;
endval;
e_trc =log(1+tr_obj);
end;
verbatim; %Note that ysINIT is a vector that contains the initial steady state values
tr_obj=tr_obj_old;
ys0_ = GB_subsidy_TR_steadystate;
tr_obj=tr_obj_new;
oo_.steady_state = GB_subsidy_TR_steadystate;
end;
where tr_obj is a global variable that changes the steady state computed in the file GB_subsidy_TR_steadystate.m .
I've checked the .m produced out of the .mod file and it seems that the initial (y0_) and final (oo_.steady_state) are correctly associated.
The NaNs appear in the Jacobia and residual at the second iteration.
Note that my model contains a number of variables that are constant in this exercise.
Any suggestion?
I attache a zipped folder with the model if you want to reproduce the error (not it is set to run stoch_simul. Just comment this and uncomment simul.
Thanks and best
Gianni
Gianni