misleading warning on missing shocks(learnt_in=1) block
According to the manual a shocks(learnt_in=1) block is equivalent to a regular shocks block
; however, if I use the below mod file, I get a warning Warning: perfect_foresight_with_expectation_errors_setup: there is no shocks(learnt_in=...) or endval(learnt_in=...) block, and you did not pass the datafile option, so there is no point in using this command
.
I find the warning a bit unlucky in this case, even though indeed there is no point in using this command instead of the regular perfect_foresight ones.
var c k; varexo x;
parameters alph gam delt bet aa;
alph=0.5; gam=0.5; delt=0.02; bet=0.05; aa=0.5;
model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
end;
initval;
x = 1;
k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
c = aa*k^alph-delt*k;
end;
steady;
check;
shocks(learnt_in = 1);
var x;
periods 2:3;
values 1.2;
end;
perfect_foresight_with_expectation_errors_setup(periods = 7);
perfect_foresight_with_expectation_errors_solver;
rplot c;