MyNixOS website logo
Description

Survey Sampling Procedures.

Sampling procedures from the book 'Stichproben - Methoden und praktische Umsetzung mit R' by Goeran Kauermann and Helmut Kuechenhoff (2010).

samplingbook package

Build Status(Linux) Build status(Windows) CoverageStatus GitHub reposize GitHubissues

CRAN StatusBadge CRANDownloads CRAN License CRANdependenciesstatus Website

Sampling procedures from the book ‘Stichproben - Methoden und praktische Umsetzung mit R’ by Goeran Kauermann and Helmut Kuechenhoff (2010).

The book introduces the basic principles for sampling and corresponding statistical analysis. The following topics are covered:

  1. Introduction of Basic Sampling Principles
  2. Simple Sample Methods
  3. Model-based Sampling
  4. Design-based Sampling: Horvitz-Thomson Estimate
  5. Grouping of Populations: Stratified and Cluster Sampling
  6. Methods with Multiple Phases
  7. Problems in Real-World Applications

Each chapter concludes with exemplifying real-world applications in R, which utilize the functions from this R package.

Installation

You can install the latest production version from CRAN

install.packages("samplingbook", dependencies = TRUE)

or the current development version from GitHub

library("devtools")
install_github("jmanitz/samplingbook")

Then, load the package

library("samplingbook")

Example: Simple Sample and Estimation of Proportions

In a company with N=300 employees a survey was conducted regarding to improve working conditions. A random sample of n=100 employees was drawn and two questions were asked:

  • Would you support more flexibility in your working hours?
  • Would you support a possibility for child care within the company?

The questions were answered with “yes” by 45 and 2 employees, respectively. Using samplingbook::Sprop(), we can estimate the proportions of support in the entire company:

Sprop(m=45, n=100, N=300)
## 
## Sprop object: Sample proportion estimate
## With finite population correction: N = 300 
## 
## Proportion estimate:  0.45 
## Standard error:  0.0408 
## 
## 95% approximate confidence interval: 
##  proportion: [0.37,0.53]
##  number in population: [111,159]
## 95% exact hypergeometric confidence interval: 
##  proportion: [0.3667,0.5367]
##  number in population: [110,161]

Thus, between 37% and 53% of all employees, thus between 111 and 159 persons, are estimated to support more flexible working hours.

Sprop(m=2, n=100, N=300)
## 
## Sprop object: Sample proportion estimate
## With finite population correction: N = 300 
## 
## Proportion estimate:  0.02 
## Standard error:  0.0115 
## 
## 95% approximate confidence interval: 
##  proportion: [-0.0025,0.0425]
##  number in population: [0,12]
## 95% exact hypergeometric confidence interval: 
##  proportion: [0.0067,0.0633]
##  number in population: [2,19]

On the other hand, the survey results that only between 1 and 19 employees would support child care within the company.

The example shows, that in particular the for small proportion estimates, the calculations of exact confidence intervals using the hypergeometric distributions is more appropriate.

Some remarks on exact hypergeometric confidence intervals for proportion estimates can be found in the vignette.

Contributions

  • Goeran Kauermann and Helmut Kuechenhoff for their guidance and ideas
  • Cornelia Oberhauser for proof reading and testing
  • Mark Hempelmann, Shuai Shao, Nina Westerheide, and Manuel Wiesenfarth for contributing source code

Citation

Juliane Manitz, Mark Hempelmann, Goeran Kauermann, Helmut Kuechenhoff, Shuai Shao, Cornelia Oberhauser, Nina Westerheide and Manuel Wiesenfarth (2020). samplingbook: Survey Sampling Procedures. R package version 1.2.4. https://CRAN.R-project.org/package=samplingbook

Use toBibtex(citation("samplingbook")) in R to extract BibTeX references.

Metadata

Version

1.2.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows