generalized beta distribution error

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.

generalized beta distribution error

Postby agupta28 » Wed Dec 10, 2008 8:24 pm

Hi all,

I think there is an error in the generalized beta distribution. I am talking specifically about the priordens.m file in dynare.

In that file, the formula for calculating shape and scale parameters are correct only if the range on the beta distribution is (0,1).

However, if the range is not (0,1) and something else, I doubt if that is the correct way to calculate the shape and scale parameters.

if pshape(i) == 1; % (generalized) BETA Prior
mu = (p1(i)-p3(i))/(p4(i)-p3(i));
stdd = p2(i)/(p4(i)-p3(i));
a = (1-mu)*mu^2/stdd^2 - mu;
b = a*(1/mu - 1);
lnprior = lnprior + lpdfgbeta(para(i),a,b,p3(i),p4(i)) ;

Here mu and stdd are calculated for range (p3,p4). However, the formula for calculating a,b assumes that p3,p4 = 0,1. Therefore if p3,p4 is not equal to 0,1 that would give us incorrect results. Could someone please confirm this. I do not know what the correct formula should be for calculating a,b when p3,p4 is not equal to 0,1. I think that is something very complicated.

Thanks,

Abhishek.
abhishek
agupta28
 
Posts: 29
Joined: Tue Mar 04, 2008 2:17 am

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests