| 1 |
/* Test the correctness of the Ramsey command when a Lagrange multiplier |
| 2 |
* appears with a lead ⩾2, and thus ends up in the definition of an auxiliary variable. |
| 3 |
* |
| 4 |
* This is related to issues #633, #1119 and #1133 |
| 5 |
* |
| 6 |
* The example is adapted from Juillard, Michel (2011): User manual for optimal policy package, |
| 7 |
* MONFISPOL FP7 project SSH-225149, Deliverable 1.1.2 |
| 8 |
*/ |
| 9 |
|
| 10 |
var pai, c, n, r, a; |
| 11 |
varexo u; |
| 12 |
parameters beta, rho, epsilon, omega, phi, gamma; |
| 13 |
|
| 14 |
beta=0.99; |
| 15 |
gamma=3; |
| 16 |
omega=17; |
| 17 |
epsilon=8; |
| 18 |
phi=1; |
| 19 |
rho=0.95; |
| 20 |
|
| 21 |
model; |
| 22 |
log(a) = rho*log(a(-2))+u; |
| 23 |
1/c = beta*r/(c(+1)*pai(+1)); |
| 24 |
pai*(pai-1)/c = beta*pai(+1)*(pai(+1)-1)/c(+1)+epsilon*phi*n^(gamma+1)/omega -a*n*(epsilon-1)/(omega*c); |
| 25 |
a*n = c+(omega/2)*(pai-1)^2; |
| 26 |
end; |
| 27 |
|
| 28 |
initval; |
| 29 |
r=1; |
| 30 |
end; |
| 31 |
|
| 32 |
initval; |
| 33 |
a = 1; |
| 34 |
pai = beta; |
| 35 |
c = 0.9665; |
| 36 |
n = 0.9673; |
| 37 |
end; |
| 38 |
|
| 39 |
shocks; |
| 40 |
var u; stderr 0.008; |
| 41 |
end; |
| 42 |
|
| 43 |
planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma))); |
| 44 |
ramsey_model(planner_discount=0.99,instruments=(r)); |
| 45 |
steady; |
| 46 |
stoch_simul(order=1, nograph); |
| 47 |
evaluate_planner_objective; |