I am getting started with the boot package and boot command. As a first
step I tried the following. Something is wrong, but i can't see what. Any
advice would be much appreciated.
x = runif(10)
mean(x)
[1] 0.467626212374307
boot(x, mean, R=100)
Error in mean.default(data, original, ...) :
Hi there,
You need a function for your statistic:
boot(x, function(x, index) mean(x[index]), R = 1000)
ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = x, statistic = function(x, index) mean(x[index]),
R = 1000)
Bootstrap Statistics :
original biasstd. error
t1*
2 matches
Mail list logo