Skip to content
Learn Python with BNHR

Module 6 · Intermediate

Estimate under the survey design

Module 6 of Python for Survey Statistics: the sample design in svy, totals by every domain with SE, CV and CI, weighted estimates beside the sample's own counts at three levels, and ReGenesees call by call. Its sections, its notebooks to read on the web, and the companion's solutions and explanations.

Module 6Level Intermediate
On this page
  1. Overview
  2. What you do
  3. The module’s notebooks
  4. Quizzes
  5. Certification and support

A sample counts for the population only through its design. This module sets the survey’s design in svy: four strata in each province, one taken in full, the enumeration area as the cluster, the rows the design can use and the households its checks find out of place, and the finite population correction as population counts, where R’s survey packages also take fractions. It estimates totals by every domain, from one variable to four, with their standard errors, CVs and confidence intervals, then sets each weighted estimate beside the sample’s own counts at national, regional and provincial levels, and shows the R option of a design whose every weight is 1.

The last section maps ReGenesees to Python call by call. Each call is run two ways side by side: with svy, where it already exists, and with a function the course writes from the formula. Where no Python library has the call, the own function stands alone. Understand the problem, and the Python follows.

  1. The design in words and in svy: weights, strata, PSUs, fpc, lonely PSUs
  2. Totals, means and proportions with SE, CV and CI by domain
  3. Weighted and unweighted
  4. From ReGenesees to svy, call by call

The notebooks are in your course folder; here you can read them without running anything. For reference in any module: primer: from r to python and primer: survey sampling in one page and glossary.

Quizzes

The quizzes are on BNHR Quizzes and count toward nothing. Learning on your own, a quiz opens as the self-paced one; while a training runs, it asks which training you are in.

Saved in this browser only

Certification and support

We offer additional resources, certificates, ongoing support, and other perks to those who join our instructor-led training.

Join an upcoming training to take this as an instructor-led course, or contact us to arrange one for your team or organization.

Something new

Identify results
LayerExplore a debugging drill
Debugging drill D2Debugging drill: the report that goes wrong
AboutThe second debugging drill of Arrays & DataFrames, after module 5: five mistakes that put wrong numbers in a survey report, to predict, trace, fix and explain.
CourseArrays & DataFrames, free