CDF external function problem

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.

CDF external function problem

Postby st348 » Fri Jun 09, 2017 5:19 pm

Hi,
I am using the logncdf(x,j,k) function to attach values to a variable in my code.
The problem is that checking the simulation values my variable takes variables less than 0 and greater than 1 which is impossible for a CDF.

Any ideas why this is happening?

Best,
Stelios
st348
 
Posts: 7
Joined: Mon Apr 25, 2016 5:24 pm

Re: CDF external function problem

Postby jpfeifer » Fri Jun 09, 2017 5:34 pm

I presume you are talking about stochastic simulations, i.e. stoch_simul. These simulation rely on perturbation techniques, i.e. approximating any nonlinear function by a polynomial. Even if your nonlinear function is bounded, that boundedness will not be preserved when being approximated. Is that what you experience?
------------
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: CDF external function problem

Postby st348 » Fri Jun 09, 2017 7:43 pm

Hi Johannes,

That's exactly what I am talking about. Is there any rule of thumb or common solution to this problem (e.g. change of the parameter values)?
If I get a probability of e.g. -2, it just makes intuitively no sense.

Best,
Stelios
st348
 
Posts: 7
Joined: Mon Apr 25, 2016 5:24 pm

Re: CDF external function problem

Postby jpfeifer » Sun Jun 11, 2017 8:13 am

No, there is nothing you can do about this if your model and the shock processes are correctly specified. If you get so big deviations from what is theoretically feasible, it tells you the solution method you use is too inaccurate. Note, however that this statement relies on the shock processes being specified correctly. One percent is 0.01, not 1 in the shocks block.
------------
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: CDF external function problem

Postby st348 » Mon Jun 12, 2017 11:23 am

Yes I know. It somehow becomes better if I reduce quite a lot the standard deviations, in order to keep the probabilities in the [0,1] bound.
Thank you!
st348
 
Posts: 7
Joined: Mon Apr 25, 2016 5:24 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 4 guests