# Make a population with units of different size
x <- c(1:10, 100)
# Draw a sequential Poisson sample
(samp <- sps(x, 5))
# Make some bootstrap replicates
dist <- list(
pseudo_population = NULL,
standard_normal = rnorm,
exponential = \(x) rexp(x) - 1,
uniform = \(x) runif(x, -sqrt(3), sqrt(3))
)
lapply(dist, sps_repweights, w = weights(samp), replicates = 5, tau = 2)
Run the code above in your browser using DataLab