Commit fc6c78e5 authored by Johannes Pfeifer 's avatar Johannes Pfeifer
Browse files

testsuite: transform old steady state files to steady_state_model-blocks

Allows for easier maintenance
parent 8065e9d4
......@@ -848,8 +848,6 @@ EXTRA_DIST = \
kalman/likelihood_from_dynare/fs2000_estimation_check.inc \
kalman/likelihood_from_dynare/fs2000ns_model.inc \
kalman/likelihood_from_dynare/fs2000ns_estimation_check.inc \
identification/kim/kim2_steadystate.m \
identification/as2007/as2007_steadystate.m \
estimation/fsdat_simul.m \
ep/mean_preserving_spread.m \
decision_rules/example1_results_dyn_432.mat \
......
......@@ -29,6 +29,11 @@ shocks;
var EfficiencyInnovation = 1;
end;
steady_state_model;
efficiency=0;
Efficiency=effstar;
end;
steady;
options_.ep.stochastic.order = 0;
......
function [ys, info] = ar_steadystate(ys, exogenous)
% Steady state routine for ar.mod (First order autoregressive process)
global M_
info = 0;
ys(1)=M_.params(2);
ys(2)=0;
\ No newline at end of file
......@@ -30,6 +30,17 @@ INFL = pi_steady+400*pie;
INT = pi_steady+rr_steady+4*gam_steady+400*R;
end;
steady_state_model;
pie=0;
y=0;
R=0;
g=0;
z=0;
YGR=gam_steady;
INFL = pi_steady;
INT = pi_steady+rr_steady+4*gam_steady;
end;
estimated_params;
tau, gamma_pdf, 2, 0.5;
kap, beta_pdf, 0.2, 0.1;
......
function [ys,check1]=as2007_steadystate(ys,exo)
global M_
for j=1:length(M_.param_names)
eval([M_.param_names{j},' = M_.params(j);'])
assignin('base', M_.param_names{j} , M_.params(j));
end
for j=1:length(M_.endo_names)
eval([M_.endo_names{j},' = NaN;'])
end
check1=0;
pie=0;
y=0;
R=0;
g=0;
z=0;
YGR=gam_steady;
INFL = pi_steady;
INT = pi_steady+rr_steady+4*gam_steady;
%% end own model equations
for iter = 1:length(M_.params) %update parameters set in the file
eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names{iter} ';' ])
end
NumberOfEndogenousVariables = M_.orig_endo_nbr; %auxiliary variables are set automatically
for ii = 1:NumberOfEndogenousVariables
varname = M_.endo_names{ii};
eval(['ys(' int2str(ii) ') = ' varname ';']);
end
......@@ -33,6 +33,15 @@ 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;
......
function [ys,check1]=kim2_steadystate(ys,exo)
global M_
for j=1:length(M_.param_names)
eval([M_.param_names{j}, ' = M_.params(j);'])
assignin('base', M_.param_names{j}, M_.params(j));
end
for j=1:length(M_.endo_names)
eval([M_.endo_names{j}, ' = NaN;'])
end
check1=0;
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 own model equations
for iter = 1:length(M_.params) %update parameters set in the file
eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names{iter} ';' ])
end
NumberOfEndogenousVariables = M_.orig_endo_nbr; %auxiliary variables are set automatically
for ii = 1:NumberOfEndogenousVariables
varname = M_.endo_names{ii};
eval(['ys(' int2str(ii) ') = ' varname ';']);
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment