Bootstrap Statistics

I tried to bootstrap to estimate the standard error and construct a confidence interval. Unfortunately, I get 0 for my standard error. Did I miss anything somewhere? Please help!

Hello @kathrynssy ,

in line 49 you say that your are defining a function.
But in line 50 you just calculate a constant.
Could this be the reason for your unexpected result?

1 Like

Furthermore, I think that the value of the bootstrap you need to inseert inside the function and not separately. For example I used the bootstrap for the levene test and the script is


I would also say the definition of mean_difference is incorrect.

It doesn't need to be a function, as you define meanFunc() later, but currently it's a vector of length 1, which you can't bootstrap on: if you resample from a vector of length 1, all the resamplings can only contain that one value.

The data argument of the boot() function expects a dataset that can be resampled.

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.