% Created by Marco Ratto (@rattoma, marco.ratto@ec.europa.eu) % ========================================================================= % Copyright (C) 2010-2020 Dynare Team % % This file is part of Dynare. % % Dynare is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. % % Dynare is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . % ========================================================================= var c k i a lam; varexo ea; parameters alph betae delta as s theta phi dumpy ; alph=0.6; betae=0.99; delta=0.0125; as=0.1; phi=2; s=betae*delta*alph/(1-betae+delta*betae); theta=1; model; //(1-(betae*delta*alph/(1-betae+delta*betae)))^theta/c^(1+theta)/(1+theta)*(1+theta)*(i/(betae*delta*alph/(1-betae+delta*betae)))^theta*(i/k/delta)^phi=betae*(1-(betae*delta*alph/(1-betae+delta*betae)))^theta/c(+1)^(1+theta)/(1+theta)*(alph*(1+theta)*a(+1)^(1+theta)*k^(alph*(1+theta)-1)+(1-delta)*(i(+1)/k/delta)^phi*(1+theta)*(i(+1)/(betae*delta*alph/(1-betae+delta*betae)))^theta); lam*(1+theta)*(i/(betae*delta*alph/(1-betae+delta*betae)))^theta*(i/k/delta)^phi=betae*lam(+1)*(alph*(1+theta)*a(+1)^(1+theta)*k^(alph*(1+theta)-1)+(1-delta)*(i(+1)/k/delta)^phi*(1+theta)*(i(+1)/(betae*delta*alph/(1-betae+delta*betae)))^theta); k=(delta*(i/delta)^(1-phi)+(1-delta)*k(-1)^(1-phi))^(1/(1-phi)); ((1-(betae*delta*alph/(1-betae+delta*betae)))*(c/(1-(betae*delta*alph/(1-betae+delta*betae))))^(1+theta) + (betae*delta*alph/(1-betae+delta*betae))*(i/(betae*delta*alph/(1-betae+delta*betae)))^(1+theta))^(1/(1+theta))= (a*k(-1)^alph); a = as+ea; lam = (1-(betae*delta*alph/(1-betae+delta*betae)))^theta/c^(1+theta)/(1+theta); //cobs = c+ec; end; steady_state_model; s=betae*delta*alph/(1-betae+delta*betae); a=as; %as^((1-alph)/(1+theta))*(delta^((phi+theta+1)/(theta+1))/s)^alph; k=(delta/s/a)^(1/(alph-1)); i=delta*k; c=(((a*k^alph)^(1+theta)-s*(i/s)^(1+theta))/(1-s))^(1/(1+theta))*(1-s); lam = (1-s)^theta/c^(1+theta)/(1+theta); end; steady; check; shocks; var ea = 1; //var ec = 0; end; estimated_params; alph ,uniform_pdf, , ,0.5,0.7; //betae ,uniform_pdf,0.99,0.004,0.98,1; //delta ,uniform_pdf,0.0125,0.001,0.01,0.015; phi ,uniform_pdf, , ,0,10; theta ,uniform_pdf, , ,0,10; dumpy ,uniform_pdf, , ,0,10; end; varobs c i; /* Skip test under MATLAB R2009b MATLAB crashes, most likely due to an internal bug */ if isoctave || ~matlab_ver_less_than('7.10') identification(advanced=1,max_dim_cova_group=3); //varobs c i lam; //to check if observing lam identifies phi and theta //identification(ar=1,advanced=1,max_dim_cova_group=3,prior_mc=250); //identification(prior_mc=100); estim_params_=[]; identification(advanced=1,max_dim_cova_group=3); end