# Error with deterministic model

hi

I’m simulating a deterministic model and I get this error, any hint what does it mean?
I have no variable c. For the Steady State works fine.
Thanks!

Attempted to access c(:,12); index out of bounds because size©=[0,0].

Error in ==> bksupk at 46
d1(ir) = c(:,jcf) ;

Error in ==> simk at 314
c = bksupk(ny,fid,ncc,icc1) ;

Error in ==> simul at 73
simk ;

Hi, c is an internal variable of dynare and is not related to your declared endogenous variables. Can you post your mod file?

Best,
Stéphane.

Thanks!
The code is below. It is very simple, just a static equation that Dynare solves when I ask it to find the steady state.
Then I wanted to shock one of the parameters for some periods and plot the time series of another variable for T periods.
So Dynare has to solve a system of T nonlinear equations. I thought this is what the deterministic command “simul” would do. But it does not work.
Do you know why?
Thanks a lot!!!

var n1;
varexo shock1;
parameters alphac alphah ep;

alphac = 0.67;
alphah = 0.8;
ep = .8;

model;
(((1-n1)^alphac)/(n1^alphah))^(1/ep)=((1-shock1)/shock1)(alphac/alphah)(((1-n1)^(alphac-1))/(n1^(alphah-1)));
end;

initval;
shock1 = 0.3;
n1=.5;
end;
steady;

shocks;
var shock1;
periods 1:5;
values 0.35;
end;

simul(periods=10);
rplot n1;

Hi, Dynare crashes with your code but It’s not surprising. I really don’t understand what you are trying to do. Your model has no leads or lags. You don’t need Dynare to solve your (static) equation for n1… If you don’t have a closed form solution you just have to call twice the matlab’s non linear solver (for the two values of shock1).

Best, Stéphane.