Learn R Programming

empirical (version 0.2.0)

mode: Empirical Mode

Description

Compute the mode of data using the empirical probability density function. Note that there are some problems using all=TRUE or warning=TRUE.

Usage

emode (f, include.boundaries=TRUE, all=FALSE, warning=FALSE)

Arguments

f

An epdfuv or epdfc object.

include.boundaries

Include the min and max data values.

all

If true, return all modal points, otherwise, return the max modal point only.

warning

If true generate a warning if there are no or multiple modal points.

See Also

epdfuv, epdfc

Examples

Run this code
# NOT RUN {
#compute the empirical mode
x = rnorm (30, 4) ^ 2
epdfuv.f = epdfuv (x)
emode (epdfuv.f)
# }

Run the code above in your browser using DataLab