naive {modeest} | R Documentation |
This estimator, also called the *naive* mode estimator, is defined as the center of the interval of given length containing the most observations. It is identical to Parzen's kernel mode estimator, when the kernel is chosen to be the uniform kernel.
naive(x, bw = 1/2)
x |
numeric. Vector of observations. |
bw |
numeric. The smoothing bandwidth to be used. Should belong to (0, 1). See below. |
A numeric vector is returned, the mode estimate, which is the center of the
interval of length 2*bw
containing the most observations.
The user should preferentially call naive
through
mlv(x, method = "naive", bw)
.
This returns an object of class mlv
.
Paul Poncet paulponcet@yahoo.fr
mlv
for general mode estimation;
parzen
for Parzen's kernel mode estimation
# Unimodal distribution x <- rf(10000, df1 = 40, df2 = 30) ## True mode fMode(df1 = 40, df2 = 30) ## Estimate of the mode mean(naive(x, bw = 1/4)) M <- mlv(x, method = "naive", bw = 1/4) print(M) plot(M, xlim = c(0,2))