set the sample size of boot() funciton

Dear All:
When using the boot() function:
boot(Auto, boot.fn, 1000);
can I set the size of the sample for each boot?. Let us say, the sample size is 10000, and I want the resample size is 1220 for boot.

Hi @muhtarjan,
Welcome to the RStudio Community Forum.

Does this do what you want?

boot(Auto[sample(nrow(Auto), size=1220),], boot.fn, 1000)


Yes, it is exactly what i wanted.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.