Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: optim funciton do not iterate

Silver_80:

I have a simulated mixture data. My code is about 5 pages and my function is very complicated. I am working with EM algorithm to estimate the model parameters. I test my code many times and it seems there is no mistake or any bug. I ran optim function and at the first 3-4 iteration of EM algorithm it is works very fine. However, after that, It do not do any iteration. That is,


iter 10 value -7188.009747
iter 20 value -7188.960597
iter 30 value -7188.992554
final value -7188.993265
converged
iter 10 value -5353.666171
iter 20 value -5353.683271
final value -5353.684877
converged
10489.98 ##log -likelihood value of each iteration of EM
iter 10 value -7316.016245
iter 20 value -7316.026151
final value -7316.027051
converged
iter 10 value -5225.455043
final value -5225.459942
converged
10500.61
final value -7345.585101 ## here the `optim` do not iterate. just give me the final value.
converged
iter 10 value -5195.524228
final value -5195.525051
converged
10503.52
final value -7353.197968
converged
iter 10 value -5187.829525
final value -5187.829525
converged
10504.34
final value -7355.290363
converged
final value -5185.735960
converged
10504.6
final value -7355.790378
converged
final value -5185.228538
converged
10504.65

I used this:

out

**Is my problem caused because of the choice of factr*?

Is that ok, or it indicates for some wrong in my code? Many thanks in advance.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: optim funciton do not iterate

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×