Survey Sampling Methods for Teaching and Practice

Planning, selection, and estimation for surveys under the main probability sampling designs taught in introductory sampling courses: simple random sampling with and without replacement, stratified sampling (proportional, Neyman, and cost-based allocation), systematic sampling, one- and two-stage cluster sampling, and ratio and regression estimators. Functions accept a superset of the inputs a given formula requires and silently ignore arguments that are not needed for the selected computation. Each function returns a structured object with the point estimate, the associated variance and confidence interval, a step-by-step breakdown of the calculation, and a short pedagogical note suggesting related methods to explore, making the package suitable both for applied survey work and for classroom use. Methods follow Cochran (1977, ISBN:0-471-16240-X) and Bolfarine & Bussab (2005, ISBN:8521203675), among others referenced in each function's documentation.


sampleone

R-CMD-check

sampleone provides R functions for planning, selecting, and estimating from surveys under the main probability sampling designs taught in introductory sampling courses: simple random sampling (with and without replacement), stratified sampling (proportional, Neyman, and cost-based allocation), systematic sampling, one- and two-stage cluster sampling, and ratio/regression estimators.

Developed by Miguel Luiz de Almeida Pinto to accompany the "Noções de Amostragem" course at DEs-ICET-UFMT (Prof. Dr. Mariano Martínez Espinosa, co-author of the package as author of the source course material).

Status

✅ R CMD check --as-cran: 0 errors, 0 warnings, 0 relevant notes. ✅ 136 testthat tests passing, reproducing worked numerical examples from the source course notes. ✅ Formulas catalog complete (all 6 technical chapters) and cross-validated. ✅ Core implementation complete: Cap. 2-7, 45 exported functions.

  • [x] Cap. 2 -- Conceitos base (pop_*(), amostra_estimadores())
  • [x] Cap. 3 -- Amostragem Aleatória Simples (aas_*())
  • [x] Cap. 4 -- Amostragem Estratificada (estr_*(), amostragem_ajustar_resposta())
  • [x] Cap. 5 -- Amostragem Sistemática (sist_*())
  • [x] Cap. 6 -- Conglomerados (cong1_*(), cong2_*(), cong_estima())
  • [x] Cap. 7 -- Razão e Regressão (razao_*(), reg_*())
  • [x] Função transversal amostragem_comparar_planos()
  • [x] Vinheta "catalogo-formulas" (vignettes/catalogo-formulas.Rmd)
  • [x] R CMD check --as-cran local (0 errors, 0 warnings)
  • [ ] Cobertura de testes com covr
  • [ ] Publicação no GitHub
  • [ ] Submissão ao CRAN

Installation (development version)

# install.packages("devtools")
devtools::install_github("mdelapi/sampleone")

Documentation

Example

library(sampleone)

# Tamanho de amostra para estimar uma media, populacao finita conhecida
aas_tamanho_media(sigma2 = 1240, d = 7, conf = 0.95, N = 10000)

# Alocacao otima de Neyman em amostragem estratificada
estr_alocacao_neyman(n = 261, Nk = c(1500, 2700, 3300), pk = c(0.10, 0.20, 0.40))

License

MIT © Miguel Luiz de Almeida Pinto. Course content basis: Prof. Dr. Mariano Martínez Espinosa (DEs-ICET-UFMT), used with attribution -- see inst/CITATION.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sampleone")

0.1.0 by Miguel Luiz de Almeida Pinto, 14 hours ago


https://github.com/mdelapi/sampleone


Report a bug at https://github.com/mdelapi/sampleone/issues


Browse source code at https://github.com/cran/sampleone


Authors: Miguel Luiz de Almeida Pinto [aut, cre] , Mariano Martinez Espinosa [aut] (Author of the source course material (course notes) this package implements)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports stats, utils, withr

Suggests testthat, knitr, rmarkdown, covr


See at CRAN