[R] Using density() and turnpoint to Identify maxima in data

Rainer M. Krug rainer.r at krugs.de
Mon Nov 19 14:17:44 CET 2007


Hi

I have a large dataset which follows a multimodal distribution. And I 
would like to identify the maxima. As the data is obtained from a 
stochastic simulation, not all maxima in the data are "real maxima of 
the dirstribution" but rather small random fluctuations. Unfortunately, 
it is not possible for me to run more simulations to smooth the obtained 
distribution.

What I am doing at the moment is the following:

1) use density() using the default parameter to obtain the estimated 
density distribution

2) use turnpoints() (PASTECS package) and a probability limit 0.05 to 
determine the turnpoints and select only the maxima for further analysis 
of the density distribution obtained in (1).

My question is:

I have several independent datasets which I want to analyse - do I have 
to set the width in density() to a specific value or can I use the 
default selection method (which results in different bandwidths) to be 
able to compare the identified maxima between different datasets?


And: Is there a better approach to do this?

Thanks a lot in advance,

Rainer

-- 
NEW EMAIL ADDRESS AND ADDRESS:

Rainer.Krug at uct.ac.za

RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH

Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa

Tel:		+27 - (0)21 650 5776 (w)
Fax:		+27 - (0)86 516 2782
Fax:		+27 - (0)21 650 2440 (w)
Cell:		+27 - (0)83 9479 042

Skype:		RMkrug

email:	Rainer.Krug at uct.ac.za
       	Rainer at krugs.de



More information about the R-help mailing list