Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes the Horvitz-Thompson estimator of the population total according to a single stage sampling design.
1 | E.1SI(NI, nI, y, PSU)
|
NI |
Population size of Primary Sampling Units. |
nI |
Sample size of Primary Sampling Units. |
y |
Vector, matrix or data frame containig the recollected information of the variables of interest for every unit in the selected sample. |
PSU |
Vector identifying the membership to the strata of each unit in the population. |
The function returns a data matrix whose columns correspond to the estimated parameters of the variables of interest.
This function returns the estimation of the population total of every single variable of interest, its estimated standard error and its estimated coefficient of variation.
Hugo Andres Gutierrez Rojas <hugogutierrez at gmail.com>
Sarndal, C-E. and Swensson, B. and Wretman, J. (1992), Model Assisted Survey Sampling. Springer.
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 | data('BigCity')
Households <- BigCity %>% group_by(HHID) %>%
summarise(Stratum = unique(Stratum),
PSU = unique(PSU),
Persons = n(),
Income = sum(Income),
Expenditure = sum(Expenditure))
attach(Households)
UI <- levels(as.factor(Households$PSU))
NI <- length(UI)
nI <- 100
samI <- S.SI(NI, nI)
sampleI <- UI[samI]
CityI <- Households[which(Households$PSU %in% sampleI), ]
attach(CityI)
area <- as.factor(CityI$PSU)
estima <- data.frame(CityI$Persons, CityI$Income, CityI$Expenditure)
E.1SI(NI, nI, estima, area)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.