I have tried to code the code from “understanding the effects of covernment spending on consumption”, but something is clearly wrong as i keep getting residuals. Have spent the last two day trying to figure it out but is still clueless. Would anyone mind taking a look? (my thesis is due this week so in trouble)

All initial values have to be 0 as the model is expressed in deviations from steady state. In that regard, equations

//Markup
my_p=y-n-w;
my_p=y-k-r_k;
are wrong. my_p is not a parameter but the deviation of the markup from its steady state (or actually it is a parameter, but the equations need \hat my_p and not my_p). Hence, it is a variable as written in the paper.

P.S.: Consider yourself lucky, usually I don’ respond to questions at the last minute.

[quote=“jpfeifer”]All initial values have to be 0 as the model is expressed in deviations from steady state. In that regard, equations

//Markup
my_p=y-n-w;
my_p=y-k-r_k;
are wrong. my_p is not a parameter but the deviation of the markup from its steady state (or actually it is a parameter, but the equations need \hat my_p and not my_p). Hence, it is a variable as written in the paper.

P.S.: Consider yourself lucky, usually I don’ respond to questions at the last minute.[/quote]

thank you very much, fixed it and it runs partly, however now I get the error message

Error using ones
NaN and Inf not allowed.
Error in dyntable (line 58)
hh = hh char(32*ones(1,hlb)) deblank(headers(i,:)) …
Error in disp_moments (line 97)
dyntable(title,headers,labels,autocorr,size(labels,2)+2,8,4);
Error in stoch_simul (line 154)
disp_moments(oo_.endo_simul,var_list);
Error in gali_new (line 224)
info = stoch_simul(var_list_);
Error in dynare (line 120)
evalin(‘base’,fname) ;

the headline AUTOCORRELATION OF SIMULATED VARIABLES

and I do not get anu IRFs graphs out.

Understand that I am asking all too late, and would be very grateful if you had some input. gali_new.mod (2.58 KB)

before steady to see that the steady state is still not correct. Are you sure the FOCs as written in the model is correct? It seems as if once r is the level of the net interest rate (in the Taylor rule) and once its deviation from steady state (in the Euler equation)

There is something wrong with your model. It is possibly not well defined, as you get negative values at steady-state and a huge negative real interest rate. Be careful with the timing of the variables. Capital is a pre-determined variable and needs to be treated as such. So the law of motion of capital writes k=delta*i+(1-delta)*k(-1) and the production function: y=(1-alpha)n+alphak(-1). Btw, shouldn’t this be: y=n^(1-alpha) + k(-1)^alpha ?? I tried to correct all these but problems persist.
K.

I cannot find the mistake. Can any of you recomend a (simple) closed economy model that includes government spending and lump sum taxes? (It does not need to include non-Ricardian consumers.)

(I have been fortunate enough to have been given an extention of the deadline)

[quote=“cup”]I cannot find the mistake. Can any of you recomend a (simple) closed economy model that includes government spending and lump sum taxes? (It does not need to include non-Ricardian consumers.)

(I have been fortunate enough to have been given an extention of the deadline)[/quote]