Looking for an iterative method to fit a beta-exponential distribution to a dataset

93 Views Asked by At

I have a messy beta-exponential distribution that has 3 variables that I have to fit to from a dataset with 50 observations.

The problem is that I only know how to use Newton-Raphson for 1 variable.

My question is what optimization method can I use to fit this distribution, in conjunction with the method of maximum likelihood.

If it's possible, please link to a page with a how-to for the optimization method and example code.

1

There are 1 best solutions below

0
On

thanks for all the help. One of the reasons I was having problems was because deriving the MLE for the beta-exponential distribution was really hard. I thought I could derive it and solve it with matrices but my method was really hard to implement.

Instead, I used a pre-programmed function in SAS called NLP in order to find my parameters and fit the distribution. This is the code I wrote.

Note1: The data set was in a CSV file. Note2: The question

Let (,)=∫^(−1)*(1−)^(−1). A random variable is said to follow a beta-exponential distribution with parameters >0, >0, >0 if it has density ()= (exp((−)/)(1−exp(−/))^(−1))/(,) >0, 0 ≤0. I had to find parameters alpha, beta, lambda by fitting a given dataset to this distribution.

PROC iml; use WORK.BETA; read all into x; close; start F_BETTS(param) global(x); /Calculates MLE/

y= param[1];/* y is lambda*/
a= param[2];/* a is alpha*/
b= param[3];/* b is beta*/
n= nrow(x);
F_BETTS = j(n,1,.);

    do i=1 to n;
    F_BETTS[i]=(exp(-b*x[i]/y)*(1-exp(-x[i]/y))**(a-1))/(y*beta(a,b)); /*Beta-exponential distribution*/
    end;

f = sum(log(F_BETTS));
return(f);

finish;

con ={0.01 0.01 0.01, . . .}; /Sets min constraints to barely over 1 and max constraints to infinity/

Initial={4 2 10}; /* Initial parameter / opt={1 4}; / finds maximum with lots of output*/

call nlpnra(rc, xres, "F_BETTS", Initial, opt, con);

run; quit;