Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
dynare
Commits
93668809
Commit
93668809
authored
Sep 18, 2017
by
Johannes Pfeifer
Browse files
Clarify inverse_gamma_specification.m
parent
3aac5663
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/distributions/inverse_gamma_specification.m
View file @
93668809
...
...
@@ -14,8 +14,10 @@ function [s,nu] = inverse_gamma_specification(mu, sigma2, lb, type, use_fzero_fl
% - s [double] scalar, first hyperparameter.
% - nu [double] scalar, second hyperparameter.
%
% REMARK
% The call to the matlab's implementation of the secant method is here for testing purpose and should not be used. This routine fails
% REMARKS
% 1. In the Inverse Gamma parameterization with alpha and beta, we have alpha=nu/2 and beta=2/s, where
% if X is IG(alpha,beta) then 1/X is Gamma(alpha,1/beta)
% 2. The call to the matlab's implementation of the secant method is here for testing purpose and should not be used. This routine fails
% more often in finding an interval for nu containing a signe change because it expands the interval on both sides and eventually
% violates the condition nu>2.
...
...
@@ -60,7 +62,7 @@ if nargin==4 || isempty(use_fzero_flag)
use_fzero_flag
=
false
;
else
if
~
isscalar
(
use_fzero_flag
)
||
~
islogical
(
use_fzero_flag
)
error
(
'F
our
th input argument must be a scalar logical!'
)
error
(
'F
if
th input argument must be a scalar logical!'
)
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment