I have some confusion over bootstrap simulation in R. Here is the question: I am asked to use the following parameters to produce simulation:
- 500 bootstrap replicates
- 1000 simulations
- Sample size of $n=\{10,20,100,1000\}$
- Draw your samples from a beta distribution with $\alpha=2$ and $\beta=5$
For each sample size/simulation draw a simple random sample of size $n$ from the population. In each simulation, calculate a t confidence interval for the sample mean (using $\alpha =0.1$). I am confused here about the difference between the number of bootstrap replicates and the number of simulations. Could someone explain or provide an example of how this works? Thanks!
For example, if I was trying for $n=10$:
samp <- rbeta(10,2,5)
boot_samp_dist <- replicate(500, {mean(samp[sample.int(length(samp), replace = TRUE)])})
Here I assume I'm resampling with replacement 500 times, but how would I incorporate the 1000 simulations?