Re: fmincon for empirical likelihood-type optimization



Ka Hei wrote:
I tried to use large scale method by supplying the gradient. However, now I cannot specify the upper and lower bound for the p's. When I do not specify the bound, I do get negative p's some time.

Whenever I specify the bounds, it gives me this warning:

Warning: Length of upper bounds is > length(x); ignoring extra bounds.
In checkbounds at 37
In fmincon at 238
In test at 20
Warning: Large-scale (trust region) method does not currently solve this type of problem,
using medium-scale (line search) instead.
In fmincon at 317
In test at 20

OK, two problems:

1) Presumably, one of your inputs is the wrong length.

2) When I suggested using the interior point (large-scale) algorithm, I forgot that you had equality constraints. That algorithm only accepts box constraints.

So, the medium-scale algorithm is the one you want. Sorry about that.

As for the problems you've described in other posts, "Maximizing the product of all the p's should be the same as maximizing the sum of log(p)'s. However, fmincon is giving me different solutions for the two problem!", it's hard to know what you seeing with any information. Is this simply a convergence tolerance issue? Certainly convergence in the two parameterizations are measured on different scales.
.


Quantcast