FPdust implements the FPDUST (Fattorini and Ridolfi, 1997) and PPS FPDUST (Barabesi et al., 1997) spatial sampling designs for Finite Populations. These designs draw a sample of spatial units by reducing, after each draw, the selection probability of units that are adjacent to any unit that have already been sampled. The PPS FPDUST sampling is a probability-proportional-to-size sampling obtained by including a size variable in the FPDUST sampling.
The development version of the package can be installed from GitHub:
# if not present, install 'devtools' package
install.packages("devtools")
devtools::install_github("rhobis/fpdust")
library(fpdust)
# List of contiguous units ---
cl <- list( c(2, 3), c(1,4), c(1,6), c(2,6), NULL, c(3,4))
# Generate spatial contingency matrix ---
cm <- spatialContingencyMatrix(cl)
### Draw a FPDUST sample ---
fpdust(cm, n= 2, beta=0.5)
### Draw a PPS FPDUST sample ---
X <- rgamma(6, 20)
fpdustPPS(cm, X, n= 2, beta=0.5)
rob.sichera@gmail.com
. Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.