Commit Graph

53 Commits (beb7d42d748f9f0f5216ed7aca93dceb4f73df2c)

Author SHA1 Message Date
Stéphane Adjemian(Charybdis) 0d27bd8dea Fixed unit tests on Weibull pdf (Octave testsuite).
(cherry picked from commit bc962a91c0749e6c9f108c867acde134e6bb80fc)
2018-07-17 17:44:15 +02:00
Stéphane Adjemian(Charybdis) 4154817acc Added missin semicolons.
(cherry picked from commit 4a0b1c2e93d23c85a7874b1bbea85819f56739f5)
2018-07-17 17:43:58 +02:00
Johannes Pfeifer 93668809a6 Clarify inverse_gamma_specification.m 2017-09-18 17:27:15 +02:00
Stéphane Adjemian (Charybdis) 1bf81c9f5a Fixed copyright notices. 2017-05-18 18:36:38 +02:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis) a53636e24e Fixed copyright notices. 2017-05-16 14:11:15 +02:00
Stéphane Adjemian (Charybdis) 88e1701289 Removed useless commas and semicolons. 2017-05-16 13:24:46 +02:00
Johannes Pfeifer 875497bc71 Unit test lpdfgweibull.m: adjust upper integration bound under Octave
Does not correctly integrate otherwise as more than 99% of support is 0
2017-01-18 11:01:13 +01:00
Johannes Pfeifer ca1c6ecc0e Increase test tolerance under Octave for lpdfgweibull.m 2016-11-24 11:50:21 +01:00
Johannes Pfeifer fccd164926 Provide lower tolerance to Octave's quadv function as integration otherwise stops prematurely 2016-11-10 17:33:18 +01:00
Houtan Bastani 710e8ef3a5 fix copyright dates for 2016 2016-02-23 14:04:04 +01:00
Stéphane Adjemian (Hermes) 0459d1bcd4 Fixed bug in Weibull prior.
Fixed inconsistencies in the ordering of the hyperparameters (shape and scale).
2016-02-11 21:35:29 +01:00
Stéphane Adjemian (Charybdis) d9cb5da148 Added unit test. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 32475c90b0 Fixed typo in unit test. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 1a07f95218 Fixed bug in the unit test for the mode of beta density. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 0a4b9bfb3d Added missing semicolon. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 09498d30eb Updated header doc. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 3c42f7e362 Added try-catch blocks in unit tests. 2015-12-11 18:50:54 +01:00
Johannes Pfeifer 8c9736f93f Add unit tests for compute_prior_mode.m
(cherry picked from commit 7d9c3ee365aba25c131b423596a1446eafd9c6ec)
2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 09b4928ca8 Added lower bound as an argument. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) cfefa6951c Changed inputs of inverse_gamma_specification routine and added unit tests. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 85a4a082ad Added a routine for computing the hyperparameters of the Beta distribution from the expectation and the variance (with unit tests). 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 24848a2ba4 Added a routine for computing the hyperparameters of the Gamma density from the expectation and the variance (with unit tests). 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 02d53b5d1d Use statistics toolbox if available for the Weibull inverse CDF. 2015-12-11 18:50:54 +01:00
Stéphane Adjemian (Charybdis) 5fb1b1cc23 Added Weibull prior. 2015-12-04 14:50:44 +01:00
Johannes Pfeifer 19fdb309ac Fix computation of prior mode for uniform distribution
While this code is never actually used, we return the prior mean, which is directly given by the first hyperparameter.
2015-07-27 10:19:02 +02:00
Johannes Pfeifer b67e9626f7 Add more information to header of rand_multivariate_student.m 2015-05-10 10:06:42 +02:00
Stéphane Adjemian (Telemachus) 8fedac4d5e Replaced calls to dyn_assert by calls to dassert.
This routine is used to compare objects i -n unit tests.
2014-11-08 09:28:53 +01:00
Houtan Bastani c19950d358 update copyright dates for files already modified in 2012 2012-01-04 14:42:06 +01:00
Michel Juillard bd60a5beef made inverse_gamma_specification robust for a larger set of parameter values 2012-01-01 20:12:51 +01:00
Michel Juillard 6deaa23d95 changed critical value of secant for inverse_gamma_specification 2011-12-03 15:55:06 +01:00
Stéphane Adjemian (Charybdis) a0e1d3b34f Fixed bugs + cosmetic changes. 2011-12-02 12:14:38 +01:00
Sébastien Villemot 4a33af5a80 Added missing copyright header 2011-11-16 11:13:55 +01:00
Stéphane Adjemian (Charybdis) 30ed317d26 Cosmetic change in unitary test. 2011-11-14 12:08:21 +01:00
Stéphane Adjemian (Charybdis) 418382b364 Fixed bug (trac#225). Added texinfo header and unitary test. 2011-11-14 12:04:23 +01:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01:00
sebastien 1be52aaa5f Beautification: removed tabulation characters which were left in previous beautification pass
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3300 ac1d8469-bf42-47a9-8791-bf33cf982152
2010-01-05 10:46:10 +00:00
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