I am trying to maximize the Llikef function below. (min the negative of the function). However, I am getting the error below. Does anybody have suggestions on how I could max the function below? I have tried other methods, but they are not estimating my parameters very well. I've tried the method of moments and proportions. I am looking for another function in MATLAB.
Llikef = @(that)-sum(log(max(that(1),.00001).^(x.^max(that(2),.00001))-max(that(1),.00001).^((x+1).^max(that(2),.00001))));
that0 = [0.5 1];
[that,Llikef] = fminsearch(Llikef,that0);
I am getting the error below:
Warning: Log of zero.
> In meansamavg2>@(that)-sum(log(max(that(1),.00001).^(x.^max(that(2),.00001))-max(that(1),.00001).^((x+1).^max(that(2),.00001)))) at 197
In fminsearch at 339
In meansamavg2 at 203
Thanks,
Erik
|
|
0
|
|
|
|
Reply
|
Erik
|
11/19/2009 12:15:18 AM |
|