R Programming: Computing the Mode

preview_player
Показать описание
In this session we will discuss about R Programming: Computing the Mode .
Start free training today, get certified and apply for career opportunities.
Рекомендации по теме
Комментарии
Автор

Nicely done but this as most of the mode functions I have come across online does not completely solve the problem since neither deals with a tie. For instance, say you have the following numbers: 2, 3, 4, 4, 4, 5, 6, 7, 7, 9, 9, 9. Both 4 and 9 have the same frequency. However, both of the functions you list here will only find the first occurrence namely 4. It seems to me that these formula need to be modified to deal with multimodal populations - at least bimodal. Perhaps you simply remove the first mode you find (4) in this instance and then rerun (loop would do the job) and ask if the next "mode" is equal to the first and so on. Look forward to seeing your solution.

haraldurkarlsson