You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An R package that draws complex samples and estimates complex parameters
TeachingSampling allows you to select samples from the most common probabilistic sampling designs and estimate complex parameters such as totals, means, ratios, regression coefficients, and quantiles.
The package is based on:
Gutierrez, H. A. (2009). Estrategias de muestreo: diseño de encuestas y estimación de parámetros. Editorial Universidad Santo Tomás.
Kish compromise allocation for stratified sampling
Utilities
Function
Description
Domains()
Domain indicator matrix
T.SIC()
Cluster totals for single-stage sampling
Usage example
library(TeachingSampling)
data("Lucy")
N<- nrow(Lucy)
n<-400# Draw a simple random sample without replacementsam<- S.SI(N, n)
sam<-sam[sam!=0]
# Estimate population totalsy<-data.frame(Income=Lucy$Income[sam],
Expenditure=Lucy$Expenditure[sam])
E.SI(N, n, y)