Commit Graph

66 Commits (4c1af7890bf2a1ea68a218f13890f2f6a2f1b66a)

Author SHA1 Message Date
sebastien 502e3e1df8 Beautified MATLAB code (Unix newline convention + Emacs indentation), except: AIM, swz, particle
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3250 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:17:34 +00:00
stepan 2dee7d4c9e Bug fix. The mode of the Inverted Gamma -- type 1 distribution was wrong.
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2722 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-05 08:30:26 +00:00
sebastien 096b2f2541 trunk:
* created a directory "matlab/matlab", for functions missing under Matlab (but existing under Octave)
* created a directory "matlab/octave", for functions missing under Octave (but existing under Matlab)
* moved "mex/octave/rcond.m" to "matlab/octave/"
* moved "matlab/rows.m" to "matlab/matlab/rows.m" (Octave has builtin "rows")
* renamed "matlab/cols.m" to "matlab/matlab/columns.m" (Octave has builtin "columns")
* moved "matlab/distributions/toolbox" to "matlab/matlab/stats"
* adapted "dynare_config.m" to reflect these changes


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2628 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-24 16:08:27 +00:00
stepan aa31417a05 Efficiency & Cosmetic changes related to the design of bayestopt_ and
the computation of the prior density.

bayestopt_.p1 is always the prior mean
bayestopt_.p2 is always the prior standard deviation
bayestopt_.p3 is unchanged
bayestopt_.p4 is unchanged
bayestopt_.p5 [new field] is the prior mode
bayestopt_.p6 [new field] is the first hyper-parameter of the prior density
bayestopt_.p7 [new field] is the second hyper-parameter of the prior density
 
These fields are defined in  set_prior and are never changed after. In
the previous version of Dynare,  the hyper parameters of the densities
were  updated at  each iteration  of the  optimization routine  or the
metropolis.

Removed fields pmean and pstdev.

Vectorized the code in priordens.

Fixed the bug mentionned by Gianni. If a (logged) density is evaluated
outside the  prior domain, the  output of priordens if  minus infinity
(instead of a complex number).


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2556 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-06 14:38:37 +00:00
stepan ec4cc46845 Bug fix. This version can be used in the estimated_params block.
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2538 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-28 22:43:38 +00:00
stepan 448be1e6f2 Added new function. This function computes the mean of a prior
distribution (gamma, inverse  gamma 1 and 2, beta)  given the mode and
the variance.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2535 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-27 17:28:32 +00:00
stepan 01ba142329 v4.1:: Changes related to the gamma variate generator.
+ Changed headers.
+ Allows vector of coefficients when calling the Beta random generator.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2422 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-17 16:00:40 +00:00
stepan a05b5e9481 v4.1:: Changes related to the gamma variate generator.
+ Added algorithms from Devroye (1986, chapter 9).
+ Now we can generate independent gamma variates (and, as a consequence, beta)
with parameter a  <= 0.5. This was not possible  with the algorithm of
the previous version.
+ Algorithms are specialized depending on fix(a)=a, a<1 or a>1.
+ This new version can handle  vectors for a and b (same length).


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2421 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-17 15:22:58 +00:00
stepan e1b8fb9bc4 v4.1:: Reparametrization of the exponential distribution.
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2418 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-16 10:31:50 +00:00
stepan bce9aba538 v4.1:: Added a random number generator for the exponential distribution.
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2417 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-16 09:55:30 +00:00
adjemian ee67508c0f Correction of the last commit.
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2056 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-09-10 08:41:53 +00:00
adjemian 7aadec0ec5 v4.1:
+ Moved functions located in ./distribution to ./distributions/toolbox
+ Moved distribution related functions to ./distributions

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2055 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-09-09 21:47:13 +00:00
sebastien a5b3c829d8 v4 matlab: replaced CDF and quantile functions of the beta by GPL'd ones
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1982 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-05 09:52:45 +00:00
sebastien 7c25303258 v4 matlab:
* replaced CDF, PDF, quantile functions of the gamma by a GPL'd one
* replaced quantile function of the chi-square by a GPL'd one


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1981 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-05 09:40:36 +00:00
sebastien f76badf151 v4 matlab: rreplaced beta_rnd.m and gamm_rnd. by GPL'ed custom ones
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1980 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-05 09:07:02 +00:00
sebastien 8bef1f0399 v4 matlab:
* replaced dnorm, pnorm and qnorm by GPL alternatives in distributions/
* only add distributions/ to the path if under Matlab without Statistics toolbox


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1979 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-04 13:33:57 +00:00