prnsamplr
1.1.0Permanent Random Number Sampling
Overview
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 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.
Install
Health
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- References docs
- 33%
Downloads
Dependencies
Nothing depends on this yet.
Code & Tests
- Cyclomatic complexity
- 1.0 median / 17 max
- Test cases
- 37 / 0.53 per code line
Test coverage
Line coverage
95%
Expression
93.2%
Tests / Examples
94.8% / 64% ex
Functions
13 4 exported
Complexity
3.6 avg / 17 max
Call network
13 nodes / 1 edges
Call graph
Open call graph →Lowest coverage
13 functions| Function | Cyclo | Coverage |
|---|---|---|
| srs.data.frame | 12 | 93% |
| transformprn.data.frame | 7 | 95% |
| pps.data.frame | 17 | 95% |
| pps exp | 1 | 100% |
| samp exp | 2 | 100% |
| srs exp | 1 | 100% |
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| ExampleData | data.frame | 40,000 × 6 | – |
People & History
7 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 1.1.0Latest
- RR 4.5.0 released · 2025-04-11
- 1.0.02024-11-20 · diff ↗
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.3.02023-03-08 · diff ↗
- 0.2.12022-09-29 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.2.02021-01-11 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.1.12020-02-09 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.1.02019-03-02
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2019-03-02
- Total releases
- 7 / 7 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.2
- Bundled data
- 412 KB / 1 file
- Download size
- 514 KB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet