CF1997 Bayesian Estimation

Hello,
I’m trying to use BE to solve for the CF1997 model. However, I keep ending on some error. Can someone please take a look and let me know what I’am doing wrong here ?
CF1997BE.mod (2.7 KB)
InterestSpread.xls (27.5 KB).

Here is the error I am receiving :
Error using erfc
Input must be real and full.

Error in normcdf>localnormcdf (line 134)
p(todo) = 0.5 * erfc(-z ./ sqrt(2));

Error in normcdf (line 50)
[varargout{1:max(1,nargout)}] = localnormcdf(uflag,x,varargin{:});

Error in CF1997BE.static_resid (line 23)
rhs = normcdf(T(1),0,1);

Error in CF1997BE.static_resid_g1 (line 10)
residual = CF1997BE.static_resid(T, y, x, params, false);

Error in CF1997BE.static (line 6)
[residual, g1] = CF1997BE.static_resid_g1(T, y, x, params, true);

Error in evaluate_steady_state>static_problem (line 394)
[r,j] = fh_static_model(y,x,params);

Error in trust_region (line 118)
fvec1 = fcn (x2, varargin{:});

Error in dynare_solve (line 313)
[x, errorflag] = solver(f, x, j1(j), j2(j), jacobian_flag, …

Error in evaluate_steady_state (line 265)
[ys,check] = dynare_solve(@static_problem,…

Error in dynare_estimation_init (line 588)
[oo_.steady_state, params,info] = evaluate_steady_state(oo_.steady_state,M,options_,oo_,steadystate_check_flag);

Error in dynare_estimation_1 (line 110)
dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_);

Error in dynare_estimation (line 118)
dynare_estimation_1(var_list,dname);

Error in CF1997BE.driver (line 401)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);

I joined my mod and excel file !

Which Dynare version are you using? I cannot reproduce the problem. But one issue is that you rely on omegab being set, which it is not.

Hey,

I am using Dynare 5.0.

Let me send you a new document. I think these one work now.
I went through step by step (using Eric Sims code) and I am not running in any problem.

However, can you explain me how to plot the IRF for my endogenuous variables ?

SolvingBE.m (1.6 KB)
CF1997BE.mod (3.3 KB)
InterestSpread.xls (27.5 KB)
CF_Find.m (1.0 KB)

Thanks,
Marie

You did not set the bayesian_irf-command. Also note that your scaling is wrong. In the model spr has a steady state of 0.03, while in the data it’s about 3.