Permanent Random Number Sampling

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) , and therein cited papers, 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.


prnsamplr Mentioned in Awesome Official Statistics

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 1.1.0 a functionality breaking bug in srs() was fixed.

In version 1.0.0 was implemented a major overhaul of how the package is organized, as well as a change in how functions are called. S3 methods were also implemented.

In version 0.3.0 the documentation was better developed and informative error messages were added.

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.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("prnsamplr")

1.1.0 by Kira Coder Gylling, a year ago


Browse source code at https://github.com/cran/prnsamplr


Authors: Kira Coder Gylling [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports rlang, stats

Suggests data.table, stringr, testthat, tibble


See at CRAN