influenza: Population and Cases of Influenza for Administrative...

Description Usage Format Details Source References Examples

Description

The data frame influenza provides cases of influenza and inhabitants for administrative districts of Germany in 2007.

Usage

1

Format

A data frame with 424 observations on the following 4 variables.

id

a numeric vector

district

a factor with levels LK Aachen, LK Ahrweiler, ..., SK Zweibruecken, names of administrative districts in Germany

population

a numeric vector specifying the number of inhabitants in the specific administrative district

cases

a numeric vector specifying the number of influenza cases in the specific administrative district

Details

Data of 2007. If you want to use the population numbers in the future, be aware of local governmental reorganizations, e.g. district unions.

Source

Database SurvStat of Robert Koch-Institute. Many thanks to Hermann Claus.

References

Database of Robert Koch-Institute http://www3.rki.de/SurvStat/

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
data(influenza)
summary(influenza)

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

# 2) Usage of htestimate
set.seed(108506)
pps <- pps.sampling(z=influenza$population,n=20,method='midzuno')
sample <- influenza[pps$sample,]
# htestimate()
N <- nrow(influenza)
# exact variance estimate
PI <- pps$PI
htestimate(sample$cases, N=N, PI=PI, method='ht')
htestimate(sample$cases, N=N, PI=PI, method='yg')
# approximate variance estimate
pk <- pps$pik[pps$sample]
htestimate(sample$cases, N=N, pk=pk, method='hh')
pik <- pps$pik
htestimate(sample$cases, N=N, pk=pk, pik=pik, method='ha')
# without pik just approximative calculation of Hajek method
htestimate(sample$cases, N=N, pk=pk, method='ha') 
# calculate confidence interval based on normal distribution for number of cases
est.ht <- htestimate(sample$cases, N=N, PI=PI, method='ht')
est.ht$mean*N  
lower <- est.ht$mean*N - qnorm(0.975)*N*est.ht$se
upper <- est.ht$mean*N + qnorm(0.975)*N*est.ht$se
c(lower,upper) 
# true number of influenza cases
sum(influenza$cases)

samplingbook documentation built on April 3, 2021, 1:06 a.m.