Bootstrapping Function

Hey guys,

I cant figure out what is wrong with this function and why my bootstrap code won't work, please help!

#create test statistic function
test_stat <- function(data, index) {
d <- data[index,]
t_s <- ((0.75*(mean(d)))+(0.15sqrt((1/499)(sum((d-mean(d))^2))))+(0.1*(quantile(d, 0.8))))

boot_return <- boot(data = SMM048_data_cw1$dataset4, statistic = test_stat, R = 500)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.