Re: [R] Find maxima of a function

2017-08-26 Thread David Winsemius
> On Aug 26, 2017, at 12:13 PM, Ismail SEZEN wrote: > > >> On 26 Aug 2017, at 16:39, niharika singhal >> wrote: >> >> 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.1379

Re: [R] Find maxima of a function

2017-08-26 Thread Ismail SEZEN
> On 26 Aug 2017, at 16:39, niharika singhal > wrote: > > 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 <-UnivarMixingDi

Re: [R] Find maxima of a function

2017-08-26 Thread Ismail SEZEN
> On 26 Aug 2017, at 14:18, Ulrik Stervbo wrote: > > Please keep the list in cc. > > Sorry, it didn't work as expected. Maybe someone else have an appropriate > solution. > > Best, > Ulrik > > On Sa., 26. Aug. 2017, 12:57 niharika singhal > wrote: > >> Hi >> >> Thanks for you mail, >> I re

Re: [R] Find maxima of a function

2017-08-26 Thread Ulrik Stervbo
Please keep the list in cc. Sorry, it didn't work as expected. Maybe someone else have an appropriate solution. Best, Ulrik On Sa., 26. Aug. 2017, 12:57 niharika singhal wrote: > Hi > > Thanks for you mail, > I really appreciate your time on my problem > > I have posted this problem on > > > h

Re: [R] Find maxima of a function

2017-08-26 Thread Ulrik Stervbo
Hi, I once found this somewhere on stackoverflow: values <- rnorm(20, mean = c(2.15,2.0,2.9), sd = c(0.1,0.1,0.1)) v_dens <- density(values) v_dens_y <- v_dens$y r <- rle(v_dens_y) # These functions ignore the extremes if they are the first or last point maxima_index <- which(rep(x = diff(sign(

[R] Find maxima of a function

2017-08-26 Thread niharika singhal
I have a Gaussian mixture model with some parameters mean=(506.8644,672.8448,829.902) sigma=(61.02859,9.149168,74.84682) c=(0.1241933, 0.6329082, 0.2428986) And the plot look something like below.[image: enter image description here] Also, if I change my p