fpdust: Select a sample from a finite population using FPDUST...

Description Usage Arguments Value Examples

View source: R/fpdust.R

Description

Select a sample of size n from a finite population given a spatial contingency matrix, the sample size n, and a parameter beta.

Usage

1
fpdust(spMat, n, beta)

Arguments

spMat

a matrix representing spatial contingency among population units, with dimension NxN and whose values are 1's (adjacent units) or 0's (otherwisex)

n

integer scalar representing the sample size

beta

a real number <1 representing a modifier of the probability of selection for units that are adjacent to already selected units

Value

a logical vector indicating which units have been selected (TRUE if selected, FALSE otherwise)

Examples

1
2
3
4
5
6
7
# 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)

rhobis/FPdust documentation built on May 29, 2021, 8:36 a.m.