Hi, I'm having issues with by non-parametric bootstrapping function.
non.p.bootstrap <- function(vector, n) {
mode.stat <- function(my.data,i) return(my.mode(my.data[i]))
b <- boot(data = vector, statistic = mode.stat, R = n)
return(b)
}
When I run the function I get the following error message:
Error in t.star[r, ] <- res[[r]] :
number of items to replace is not a multiple of replacement length