"dert " <dert2221907@yandex.com> wrote in message <kctrch$ia4$1@newscl01ah.mathworks.com>...
> Hi,
> i'm trying to estimate the parameters of log likelihood function by using fminsearch. i have three parameters;
> x(1),x(2),x(3) and the set of valid parameters for x(1)>[0,20] , for x(2)> [0,1000], for x(3)> [0,5000]. i want to find the estimated parameters in this set. So
> i have to add some conditions to fminsearch. Namely, to discourage the algorithm from finding local minumum outside the set of valid parameters, i have to define the log likelihood to be negative infinity for values outside this set. Then i have to restart the algorithm until no improvement could be found in 20 consecutive runs. But i don't know how to do this. Is this possible?? for fminsearch, my starting point x0:[20*rand,1000*rand,5000*rand]. Can anyone please help me??
Hello,
What function are you currently using fminsearch on? I might try something like this:
function estimator = estimator(x, data)
if x outside valid range, estimator = infinity
else estimator = regular MLE estimator
(By the way, this is the MLE estimator I use and it's always worked well for me: http://www.nature.com/nmeth/journal/v7/n5/full/nmeth0510338.html )
As for the other part of your question, I'm not quite sure what you're asking, but you can set the termination tolerance of your parameters with TolX in fminsearch's options.
Hope this helps somewhat!
Chenge
