v4: corrected bug in prior_draw.m (inv-gamma2)

reindented priordens.m

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1816 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
michel 2008-05-02 04:55:06 +00:00
parent 1e096f3dee
commit 8b841cda0b
2 changed files with 20 additions and 20 deletions

View File

@ -115,7 +115,7 @@ for i = 1:npar
end
case 4% INV-GAMMA1 distribution
while condition
tmp = sqrt(1/gamma_draw(p2(i)/2,1/p1(i),0));
tmp = sqrt(1/gamma_draw(p2(i)/2,2/p1(i),0));
if tmp >= bounds(i,1) && tmp <= bounds(i,2)
pdraw(i) = tmp;
break
@ -123,7 +123,7 @@ for i = 1:npar
end
case 6% INV-GAMMA2 distribution
while condition
tmp = 1/gamma_draw(p2(i)/2,1/p1(i),0);
tmp = 1/gamma_draw(p2(i)/2,2/p1(i),0);
if tmp >= bounds(i,1) && tmp <= bounds(i,2)
pdraw(i) = tmp;
break