for (i in 1:360) { plot(1, ann = F, type = "n", axes = F) text(1, 1, "Animation", srt = i, col = rainbow(360)[i], cex = 7 * i/360) Sys.sleep(0.01)}
Acutally I only want to demonstrate the four basic sampling methods here, namely "Simple Random Sampling Without Replacement" (SRSWOR), "Stratified Sampling", "Cluster Sampling", and "Systematic Sampling"; as for other methods such as quota sampling, I don't intend to give any illustrations here because there isn't much sense of randomness.
In the following animations, I'll use 100 points as the population and draw samples from them using the four differenct methods. Colored rectangles mean "strata" or "clusters". I'll mark those points which are picked out by my program with big red circles.
As we all know, the Central Limit Theorem plays an important role in the statistical inference in survey sampling. However, I find most Chinese textbooks on survey sampling are rather misleading on the interpretation of Central Limit Theorem, thus I use another section to give some simulations.
All of these functions can be found in the R package animation with names like sample.***(), e.g. sample.simple().
For more knowledge on sampling techniques, please refer to those specific books such as: