Estimate mode (most frequent value)
Estimate mode, ie most frequent value. The argument method
allows to choose among (so far) 3 different methods available.
If "density" is chosen, the most dense region of sqrt(n) values will be chosen;
if "binning", the data will be binned (like in histograms) via rounding to a user-defined number of significant values ("rangeSign").
If method
is set to "BBmisc", the function computeMode()
from package BBmisc will be used.
stableMode( x, method = "density", bandw = NULL, rangeSign = 1:6, nCl = NULL, histLike = NULL, callFrom = NULL, silent = FALSE )
x |
(numeric) data to treat |
method |
(character) There are 3 options : BBmisc, binning and density (default). If "binning" the function will search context dependent, ie like most frequent class of histogram. Using "binning" mode the search will be refined if either 80 percent of values in single class or >50 percent in single class. |
bandw |
(integer) only used when |
rangeSign |
(integer) only used when |
nCl |
(integer) depreciated argument, please use |
histLike |
(logical) depreciated, please use argument |
callFrom |
(character) allows easier tracking of message(s) produced |
silent |
(logical) suppress messages |
MA-plot only
computeMode()
in package BBmisc
set.seed(2012); dat <- round(c(rnorm(50), runif(100)),3) stableMode(dat)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.