How to find the statistical mode?

前端 未结 30 2171
时光取名叫无心
时光取名叫无心 2020-11-21 07:00

In R, mean() and median() are standard functions which do what you\'d expect. mode() tells you the internal storage mode of the objec

30条回答
  •  没有蜡笔的小新
    2020-11-21 07:44

    There is package modeest which provide estimators of the mode of univariate unimodal (and sometimes multimodal) data and values of the modes of usual probability distributions.

    mySamples <- c(19, 4, 5, 7, 29, 19, 29, 13, 25, 19)
    
    library(modeest)
    mlv(mySamples, method = "mfv")
    
    Mode (most likely value): 19 
    Bickel's modal skewness: -0.1 
    Call: mlv.default(x = mySamples, method = "mfv")
    

    For more information see this page

提交回复
热议问题