Description
Permanent Random Number Sampling.
Description
Survey sampling using permanent random numbers (PRN's). A solution to the problem of unknown overlap between survey samples, which leads to a low precision in estimates when the survey is repeated or combined with other surveys. The PRN solution is to supply the U(0, 1) random numbers to the sampling procedure, instead of having the sampling procedure generate them. In Lindblom (2014) <doi:10.2478/jos-2014-0047>, and therein cited articles, it is shown how this is carried out and how it improves the estimates. This package supports two common fixed-size sampling procedures (simple random sampling and probability-proportional-to-size sampling) and includes a function for transforming the PRN's in order to control the sample overlap.
README.md
prnsamplr
The goal of prnsamplr is to coordinate survey samples with the help of permanent random numbers.
Installation
You can install the released version of prnsamplr from CRAN with:
install.packages("prnsamplr")
Example
This is a basic example which shows you how to solve a common problem:
library(prnsamplr)
SampledData <- samp(method=pps, df=ExampleData, nsamp="nsample", stratid="stratum", prn="rands", size="sizeM")
News
In version 0.2.1 an error in the documentation was fixed, and some code in pps was edited to make the output more consistent. In version 0.2.0 a compatibility issue with the latest R was fixed. In version 0.1.1 an issue was fixed that disallowed generic function parameters.