Re: [R] Help with optim function in R, please?

2017-08-07 Thread J C Nash
I haven't tried your code, but I've seen far too many attempts like this where there is no simple call to the function with starting parameters to see if a sensible answer is returned. If you get NaN or Inf or ... that isn't sensible, then you know it is not a good idea to try further. Beyond

[R] Help with optim function in R, please?

2017-08-06 Thread fadeh Alanazi
Hi all, Many thank in advance for helping me.  I tried to fit Expectation Maximization algorithm for mixture data. I must used one of numerical method to maximize my function. I built my code but I do not know how to make the optim function run over a different value of the parameters.