Re: [R] Fwd: Find maxima of a function

2017-08-29 Thread Martin Maechler
> Ranjan Maitra > on Sun, 27 Aug 2017 08:17:15 -0500 writes: > I have not followed the history of this thread, but I am > quite flummoxed as to why the OP is rewriting code to > estimate parameters from an univariate Gaussian mixture > model when alternatives such as E

Re: [R] Fwd: Find maxima of a function

2017-08-27 Thread Bert Gunter
Just a quick note: "I have tried to use optimr but it gives me the local maxima, now I am struck with the problem of how to get the global maxima" This is a profound misunderstanding of how numerical optimization works. **All** numerical optimizers can provide only "local" maxima (the exact meani

Re: [R] Fwd: Find maxima of a function

2017-08-27 Thread Ranjan Maitra
I have not followed the history of this thread, but I am quite flummoxed as to why the OP is rewriting code to estimate parameters from an univariate Gaussian mixture model when alternatives such as EMCluster (which generally appears to handle initialization better than MClust) exist. Or perhaps

Re: [R] Fwd: Find maxima of a function

2017-08-27 Thread Ismail SEZEN
Dear Niharika, As I said before, the problem is basically an optimization issue. You should isolate the problematic part from the rest of your study. Sometimes, more information does not help to solution. All the answers from us (Ulrik, David, me) are more or less are correct to find a maximum

[R] Fwd: Find maxima of a function

2017-08-27 Thread niharika singhal
-- Forwarded message -- From: niharika singhal Date: Sun, Aug 27, 2017 at 11:57 AM Subject: Re: Find maxima of a function To: "David Winsemius [via R]" , "Ismail SEZEN [via R]" , Ulrik Stervbo Dear David and Ismail, The actual problem is I am getting the parameters from the Kme

[R] Fwd: Find maxima of a function

2017-08-26 Thread niharika singhal
Hi, Thanks for your mail, and time It is not working for some arguments, when mean value is like >6. case mc0 <- c(0.0886,0.1744455,0.1379778,0.1209769,0.1573065,0. 1134463,0.2074027) rv <-UnivarMixingDistribution(Norm(486.4255, 53.24133), Norm(664.0713, 3.6