ABSTRACT

Simple random sampling, in which each possible sample of size n is equally likely to be selected from the population, is the foundation of all probability sampling methods. Functions in base R and various contributed packages can be used to select most types of probability samples. This chapter shows how to use them to select simple random samples; how to specify the simple random sampling design; and how to estimate population means, totals, and percentages. Each concept is illustrated with code and output produced for examples in Chapter 2 of Sampling: Design and Analysis, Third Edition, by Sharon L. Lohr.