maximize a function with two variables

  • Follow


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


0 Replies
664 Views

(page loaded in 0.019 seconds)

Similiar Articles:













7/21/2012 4:15:05 AM


Reply: