Learn R Programming

epiR (version 0.9-82)

epi.cluster1size: Sample size under under one-stage cluster sampling

Description

Returns the required number of clusters to be sampled using a one-stage cluster sampling strategy.

Usage

epi.cluster1size(n, mean, var, epsilon.r, method = "mean", 
   conf.level = 0.95)

Arguments

n

integer, representing the total number of clusters in the population.

mean

number, representing the population mean of the variable of interest.

var

number, representing the population variance of the variable of interest.

epsilon.r

the maximum relative difference between our estimate and the unknown population value.

method

a character string indicating the method to be used. Options are total, mean or mean.per.unit.

conf.level

scalar, defining the level of confidence in the computed result.

Value

Returns an integer defining the required number of clusters to be sampled.

References

Levy PS, Lemeshow S (1999). Sampling of Populations Methods and Applications. Wiley Series in Probability and Statistics, London, pp. 258.

Examples

Run this code
## A survey to estimate the total number of residents over 65 years of 
## age that require the services of a nurse is to be carried out. There are 
## five housing complexes in the study area and we expect that there might
## be a total of around 34 residents meeting this criteria (variance 6.8).
## We would like the estimated sample size to provide us with an estimate
## that is within 10% of the true value. How many housing complexes (clusters)
## should be sampled?

epi.cluster1size(n = 5, mean = 34, var = 6.8, epsilon.r = 0.10, method = 
   "total", conf.level = 0.999)

## We would need to sample 3 housing complexes to meet the specifications 
## for this study.

Run the code above in your browser using DataLab