I used next program code to estimate the standard error using bootstrap for Libras Data movement set:
mydata<-read.table('C:/Users/Desktop/libra.txt', sep=',', header=TRUE)
head(data)
custom.boot <- function(times, data=mydata) {
boots <- rep(NA, times)
for (i in 1:times) {
boots[i] <- sd(sample(data, length(data), replace=TRUE))/sqrt(length(data))
}
boots
}
# Mean standard error
mean(custom.boot(times=1000))
But I got next error:
Error in is.data.frame(x) :
(list) object cannot be coerced to type 'double'
Could you help me to figure out the problem and give advice how it can be solved? Thanks in advance!