Learn R Programming

BalancedSampling (version 1.6.3)

lcps: Locally correlated Poisson samling

Description

Selects spatially balanced sampling with prescribed inclusion probabilites from a finite population using Locally correlated Poisson sampling, a variant of SCPS (scps()).

Usage

lcps(prob, x)

Value

Returns a vector of selected indices in 1,2,...,N. If the inclusion probabilities sum to n, where n is integer, then the sample size is fixed (n).

Arguments

prob

vector of length N with inclusion probabilities

x

matrix of (standardized) auxiliary variables of N rows and q columns

Details

lcps uses euclidean distance on auxiiary variables to calculate distance between units.

References

Prentius, W. (2022). Locally correlated Poisson sampling. Manuscript.

Examples

Run this code
if (FALSE) {
  N = 1000L; # size of the population
  prob = runif(N, 0.1, 0.3); # Inclusion probabilities
  x = matrix(rnorm(3*N), ncol = 3L); # N * 3 matrix of auxiliary variables
  s = lcps(prob, x); # sample indices
}

Run the code above in your browser using DataLab