Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes a grid of possible sample sizes for estimating single proportions under two-stage sampling designs.
1 | ss4HHSp(N, M, r, b, rho, P, delta, conf, m)
|
N |
The population size. |
M |
Number of clusters in the population. |
r |
Percentage of people within the subpopulation of interest. |
b |
Average household size (number of members). |
rho |
The Intraclass Correlation Coefficient. |
P |
The value of the estimated proportion. |
delta |
The maximun margin of error that can be allowed for the estimation. |
conf |
The statistical confidence. By default |
m |
(vector) Number of households selected within PSU. |
In two-stage (2S) sampling, the design effect is defined by
DEFF = 1 + (\bar{m}-1)ρ
Where ρ is defined as the intraclass correlation coefficient, \bar{m} is the average sample size of units selected inside each cluster. The relationship of the full sample size of the two stage design (2S) with the simple random sample (SI) design is given by
n_{2S} = n_{SI}*DEFF
This function returns a grid of possible sample sizes. The first column represent the design effect, the second column is the number of clusters to be selected, the third column is the number of units to be selected inside the clusters, and finally, the last column indicates the full sample size induced by this particular strategy.
Hugo Andres Gutierrez Rojas <hagutierrezro at gmail.com>
Gutierrez, H. A. (2009), Estrategias de muestreo: Diseno de encuestas y estimacion de parametros. Editorial Universidad Santo Tomas
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 | ss4HHSp(N = 50000000, M = 3000, r = 1, b = 3.5,
rho = 0.034, P = 0.05, delta = 0.05, conf = 0.95,
m = c(5:15))
##################################
# Example with BigCity data #
# Sample size for the estimation #
# of the unemployment rate #
##################################
library(TeachingSampling)
data(BigCity)
BigCity1 <- BigCity[!is.na(BigCity$Employment), ]
summary(BigCity1$Employment)
BigCity1$Unemp <- Domains(BigCity1$Employment)[, 1]
BigCity1$Active <- Domains(BigCity1$Employment)[, 1] +
Domains(BigCity1$Employment)[, 3]
N <- nrow(BigCity)
M <- length(unique(BigCity$PSU))
r <- sum(BigCity1$Active)/N
b <- N/length(unique(BigCity$HHID))
rho <- ICC(BigCity1$Unemp, BigCity1$PSU)$ICC
P <- sum(BigCity1$Unemp)/sum(BigCity1$Active)
delta <- 0.05
conf <- 0.95
m <- c(5:15)
ss4HHSp(N, M, r, b, rho, P, delta, conf, m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.