tags:

views:

44

answers:

1

I need to get the actual list of elements used to generate each resampled statistic. To keep things really easy, I generated 100 random numbers and wanted to get the mean of each sample using tsboot from the boot package.

x <- rnorm(100)
y <- tsboot(x, mean, R=10, l=20, sim="fixed")

What I need is the 10 lists of 20 numbers generated by tsboot. I realize that there is probably an easier way to do this but the actual project will require substituting a function for the mean and playing around with the block size. I tried using tsbootstrap but also couldn't get the right output. Any assistance would be greatly appreciated.

+1  A: 

Try

boot.array(y)

which returns a matrix with R=10 rows containing the (ordered) indices of the selected values.

Aniko
Thanks! I didn't realize that it would give me the index rather than the actual values. I really appreciate the help!
ProbablePattern