I am about to use the package "modeest" to report the mode of a series dataset.
Please see this website about the package: modeest
For example:
x <- rbeta(1000,23,4)
M <- mlv(x, method = "kernel")
M[1]
M1 prints the Mode (most likely value).
In my case, I want to get the mode value every 10 numbers using running method.
If I have a series dataset contains 100 numbers, I want to get 10 mode values every 10 numbers.
Please let me guide me how I can do this in R.
I've looked into running median "runmed", I wish I can find similar method for reporting the running mode value.
Thanks so much.