[R] boot, what am I doing wrong?

2013-06-07 Thread Rguy
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, ...) :

Re: [R] boot, what am I doing wrong?

2013-06-07 Thread Jorge I Velez
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*