I need to compute bootstrap estimation of the standard error of the mean of the main variable in my sample. I would like to use the package "boot". The problem is that the sample was taken with a 2 stage stratified sampling method (the stratification is in the first stage). For this reason in the bootstrap resampling I must use this particular sampling technique for having correct estimations. So an example of my problem:
data <- data.frame(NQUEST, index, strata, weights)
NQUEST index strata(1 stage) weights
1 1432 1 423
2 678 2 749
3 9284 1 398
4 445 1 96
5 10045 1 324
6 7784 3 334
[...] [...] [...] [...]
5000 3290 1 932
-NQUEST are the units
-immagine we have 3 strata
I want to compute the standard error of the mean of "index" with bootstrap method, 1000 replications and with 2 stage resampling technique.