Skip to Content

# pps.sampling {samplingbook}

Sampling with Probabilities Proportional to Size
Package:
samplingbook
Version:
1.2.1

### Description

The function provides sample techniques with sampling probabilities which are proportional to the size of a quantity z.

### Usage

```pps.sampling(z, n, id = 1:N, method = 'sampford', return.PI = FALSE)
```

### Arguments

z
vector of quantities which determine the sampling probabilities in the population
n
positive integer for sample size
id
an optional vector with identification values for population elements. Default is `'id = 1:N'`, where `'N'` is length of `'z'`.
method
the sampling method to be used. Options are `'sampford'`, `'tille'`, `'midzuno'` or `'madow'`.
return.PI
logical. If `TRUE` the pairwise inclusion probabilities for all individuals in the population are returned.

### Details

The different methods vary in their run time. Therefore, `method='sampford'` is stopped if `N > 200` or if `n/N < 0.3`. `method='tille'` is stopped if `N > 500`. In case of large populations use `method='midzuno'` or `method='madow'`.

### Values

The function `pps.sampling` returns a value, which is a list consisting of the components

call
is a list of call components: `z` vector of quantity data, `n` sample size, `id` identification values, and `method` sampling method
sample
resulted sample
pik
inclusion probabilities
PI
sample second order inclusion probabilities
PI.full
full second order inclusion probabilities

### References

Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.

### See Also

`htestimate`

### Examples

```## 1) simple suppositious example
data <- data.frame(id = 1:7, z = c(1.8, 2 ,3.2 ,2.9 ,1.5 ,2.0 ,2.2))
# Usage of pps.sampling for Sampford method
set.seed(178209)
pps.sample_sampford <- pps.sampling(z=data\$z, n=2, method='sampford', return.PI=FALSE)
pps.sample_sampford
# sampling elements
id.sample <- pps.sample_sampford\$sample
id.sample
# other methods
set.seed(178209)
pps.sample_tille <- pps.sampling(z=data\$z, n=2, method='tille')
pps.sample_tille
set.seed(178209)
pps.sample_midzuno <- pps.sampling(z=data\$z, n=2, method='midzuno')
pps.sample_midzuno
set.seed(178209)
pps.sample_madow <- pps.sampling(z=data\$z, n=2, method='madow')
pps.sample_madow

## 2) influenza
data(influenza)
summary(influenza)

set.seed(108506)
pps <- pps.sampling(z=influenza\$population,n=20,method='midzuno')
pps
sample <- influenza[pps\$sample,]
sample```

### Author(s)

Juliane Manitz

Documentation reproduced from package samplingbook, version 1.2.1. License: GPL (>= 2)