Learn R Programming

epiR (version 2.0.75)

epi.ssclus2estc: Number of clusters to be sampled to estimate a continuous outcome using two-stage cluster sampling

Description

Number of clusters to be sampled to estimate a continuous outcome using two-stage cluster sampling.

Usage

epi.ssclus2estc(N.psu, N.ssu, b, xbar, xsigma, epsilon, error = "relative", 
   rho, nfractional = FALSE, conf.level = 0.95)

Value

A list containing the following:

n.psu

the total number of primary sampling units (clusters) to be sampled for the specified level of confidence and relative error.

n.ssu

the total number of secondary sampling units to be sampled for the specified level of confidence and relative error.

DEF

the design effect.

rho

the intracluster correlation, as entered by the user.

Arguments

N.psu

scalar integer, the total number of primary sampling units eligible for inclusion in the study. If N = NA the eligible primary sampling unit population size is assumed to be infinite.

N.ssu

scalar integer, the total number of secondary sampling units eligible for inclusion in the study.

b

scalar integer or vector of length two, the number of individual listing units in each cluster to be sampled. See details, below.

xbar

scalar number, the expected mean of the continuous variable to be estimated.

xsigma

scalar number, the expected standard deviation of the continuous variable to be estimated.

epsilon

scalar number, the maximum difference between the estimate and the unknown population value expressed in absolute or relative terms.

error

character string. Options are absolute for absolute error and relative for relative error.

rho

scalar number, the intracluster correlation.

nfractional

logical, return fractional sample size.

conf.level

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

Details

In many situations it is common for sampling units to be aggregated into clusters. Typical examples include individuals within households, children within classes (within schools) and cows within herds. We use the term primary sampling unit (PSU) to refer to what gets sampled first (clusters) and secondary sampling unit (SSU) to refer to what gets sampled second (individual listing units within each cluster). In this documentation the terms primary sampling unit and cluster are used interchangeably. Similarly, the terms secondary sampling unit and individual listing units are used interchangeably.

b as a scalar integer represents the total number of individual listing units from each cluster to be sampled. If b is a vector of length two the first element represents the mean number of individual listing units to be sampled from each cluster and the second element represents the standard deviation of the number of individual listing units to be sampled from each cluster.

A finite population correction factor is applied to the sample size estimates when a value for N is provided.

References

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

Machin D, Campbell MJ, Tan SB, Tan SH (2018). Sample Sizes for Clinical, Laboratory ad Epidemiological Studies, Fourth Edition. Wiley Blackwell, London, pp. 195 - 214.

Examples

Run this code
## EXAMPLE 1 (from Levy and Lemeshow p 292):
## We intend to conduct a survey of nurse practitioners to estimate the 
## average number of patients seen by each nurse. There are five health
## centres in the study area, each with three nurses. We intend to sample
## two nurses from each health centre. We would like to be 95% confident
## that our estimate is within 30% of the true population value. We expect 
## that the mean number of patients seen at the health centre level 
## is 84 (var 567) and the mean number of patients seen at the nurse 
## level is 28 (var 160). Previous studies report an intracluster 
## correlation for the number of patients seen per nurse to be 0.02. 
## How many health centres should be sampled?

epi.ssclus2estc(N.psu = 5, N.ssu = 15, b = 2, xbar = 28, xsigma = sqrt(160), 
   epsilon = 0.30, error = "relative", rho = 0.02, nfractional = FALSE, 
   conf.level = 0.95)

## A total of 3 health centres need to be sampled to meet the specifications 
## of this study. 

Run the code above in your browser using DataLab