This function computes a grid of possible sample sizes for estimating single proportions under two-stage sampling designs.
ss2s4p(N, P, conf = 0.95, delta = 0.03, M, to = 20, rho)
The population size.
The value of the estimated proportion.
The statistical confidence. By default conf = 0.95
.
The maximun margin of error that can be allowed for the estimation.
Number of clusters in the population.
(integer) maximum number of final units to be selected per cluster. By default to = 20
.
The Intraclass Correlation Coefficient.
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.
In two-stage (2S) sampling, the design effect is defined by
Gutierrez, H. A. (2009), Estrategias de muestreo: Diseno de encuestas y estimacion de parametros. Editorial Universidad Santo Tomas
# NOT RUN {
ss2s4p(N=100000, P=0.5, delta=0.05, M=50, rho=0.01)
ss2s4p(N=100000, P=0.5, delta=0.05, M=500, to=40, rho=0.1)
ss2s4p(N=100000, P=0.5, delta=0.03, M=1000, to=100, rho=0.2)
############################
# Example 2 with Lucy data #
############################
data(BigLucy)
attach(BigLucy)
N <- nrow(BigLucy)
P <- prop.table(table(SPAM))[1]
y <- Domains(SPAM)[, 1]
cl <- Segments
rho <- ICC(y,cl)$ICC
M <- length(levels(Segments))
ss2s4p(N, P, conf=0.95, delta = 0.03, M=M, to=30, rho=rho)
# }
Run the code above in your browser using DataLab