ERFC(x)

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

ERFC(x)

Postby hodabbbb » Wed Mar 25, 2015 5:02 pm

I have a problem with the steady state. I am using the ''normcdf'' function in my ss file.
it used to work well in my previous model.
I modified the model and now this is the error I get . Any idea what should I check ???
thnx in advance

Warning: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using
Levenberg-Marquardt algorithm instead.
> In fsolve at 285
In AGKbgg_steadystate at 25
In evaluate_steady_state_file at 49
In evaluate_steady_state at 58
In steady_ at 54
In steady at 81
In AGKbgg at 630
In dynare at 180
Error using erfc
Input must be real and full.

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

Error in normcdf (line 46)
[varargout{1:max(1,nargout)}] = localnormcdf(uflag,x,varargin{:});
hodabbbb
 
Posts: 39
Joined: Wed Mar 25, 2015 3:58 pm

Re: ERFC(x)

Postby jpfeifer » Fri Mar 27, 2015 8:06 am

I need to see the file, but my guess is that you are not correctly filtering out an exception that occurs earlier so that the input provided to the normcdf function is invalid.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ERFC(x)

Postby hodabbbb » Fri Mar 27, 2015 10:31 am

Thanks for the comment.
please find attached the file
obviously the problem is from including the NORMCDF command in ''fun'' file
hodabbbb
 
Posts: 39
Joined: Wed Mar 25, 2015 3:58 pm

Re: ERFC(x)

Postby jpfeifer » Fri Mar 27, 2015 1:57 pm

You need to tell your solver that psi cannot be negative as you are taking the log of it. Use an exp() tranformation for this.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ERFC(x)

Postby hodabbbb » Fri Mar 27, 2015 2:37 pm

Thanks a lot Mr. Pfeifer for taking your time.
Very much appreciated .
hodabbbb
 
Posts: 39
Joined: Wed Mar 25, 2015 3:58 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests