transformprn {prnsamplr} | R Documentation |
Permanent random number transformation
Description
Transformation of the permanent random numbers used in the sampling procedure, to control the overlap between samples, and thus control the sample coordination. The method used is specified in Lindblom and Teterukovsky (2007).
Usage
transformprn(frame, prn, direction, start)
Arguments
frame |
Data frame (or data.table or tibble) containing the elements to sample from. |
prn |
Variable in |
direction |
Direction for the enumeration. "U" or "R" for upwards, or equivalently to the right on the real-number line. "D" or "L" for downwards, or equivalently to the left on the real-number line. |
start |
Starting point for the transformation. For SRS this corresponds to the point at which one wants to start sampling. |
Value
A copy of the input data frame with the permanent random numbers
transformed according to specification, along with the numeric variable
prn.old
containing the non-transformed permanent random numbers.
References
Lindblom, A. and Teterukovsky, A. (2007). "Coordination of Stratified Pareto pps Samples and Stratified Simple Random Samples at Statistics Sweden." In Papers presented at the ICES-III, June 18-21, 2007, Montreal, Quebec, Canada.
See Also
prnsamplr, samp, srs, pps, ExampleData
Examples
dfOut <- transformprn(
frame = ExampleData,
prn = ~rands,
direction = "U",
start = 0.2
)