# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- library(boot) data = c( 3, 4, 6, 2, 1, 1, 5, 7, 4, 3, 8, 7, 6, 9, 5 ) data = data.frame( fund=data ) my_fn = function(DF, inds){ bd = DF[inds,] return(mean(bd)) } boot.res = boot( data, my_fn, R=500 ) print(boot.res) print( boot.ci(boot.res) )