search for: cnbdens

Displaying 1 result from an estimated 1 matches for "cnbdens".

2007 Oct 13
2
How to identify the two largest peaks in a trimodal distribution
Hello all I'm trying to do a simulation that involves identifying the minimum point between two peaks of a (usually) bimodal distribution. I can do this easily if there are only two peaks: CnBdens<-density(Ys/Xs) #probability density function for ratio of Ys to Xs for(p in 1:512) ifelse(CnBdens$y[p]>CnBdens$y[p-1],peak1<-p,break) #identifies first peak in probability distribution for(p in 1:512) ifelse(CnBdens$y[512-p]>CnBdens$y[512-p +1],peak2<-512-p,break) #identif...