CCHS Analytic Dataset: Univariate Distributions

Data Primer 1 — Complete Variable Reference by Section

Author

Analysis Team

Published

August 1, 2026

Mission

This document provides a complete univariate profile of every variable in the cchs_analytic analysis-ready table produced by manipulation/2-ellis.R. It serves as the canonical data reference for all EDAs and Reports in this project.

Dataset: CCHS 2010 + 2014 pooled analytic sample
Rows: 63,843 respondents Cols: 70 variables
Source: data-private/derived/cchs-2-tables/cchs_analytic.parquet
Pipeline documentation: data-public/metadata/CACHE-manifest.md
Variable traceability: Variable Inclusion

All computation lives in univariate-distributions.R (the laboratory). This document sources those chunks and presents output only. All chunk bodies are intentionally empty.


Environment

Code
# Choose to be greedy: load only what's needed
# Three ways, from least (1) to most(3) greedy:
# -- 1.Attach these packages so their functions don't need to be qualified:
# http://r-pkgs.had.co.nz/namespace.html#search-path
library(magrittr)
library(dplyr)     # data wrangling
library(tidyr)     # data wrangling
library(forcats)   # factors
library(stringr)   # strings
library(purrr)     # functional programming
library(knitr)     # kable tables
library(kableExtra) # kable styling (striped, condensed)
library(janitor)   # clean_names, tabyl
library(fs)        # file system operations
requireNamespace("arrow", quietly = TRUE)  # parquet I/O
Code
base::source("./scripts/common-functions.R") # project-level
Code
local_root <- "./analysis/data-primer-1/"
local_data <- paste0(local_root, "data-local/")
prints_folder <- paste0(local_root, "prints/")

if (!fs::dir_exists(local_data)) fs::dir_create(local_data, recurse = TRUE)
if (!fs::dir_exists(prints_folder)) fs::dir_create(prints_folder, recurse = TRUE)

path_parquet <- "data-private/derived/cchs-2-tables/cchs_analytic.parquet"
Code
# 9-number summary for one or more continuous variables.
# Returns one row per variable: n_valid, n_miss, mean, sd, min, p25, median, p75, max.
summarize_continuous <- function(ds, vars) {
  purrr::map_dfr(vars, function(v) {
    x_raw   <- ds[[v]]
    x_num   <- suppressWarnings(as.numeric(x_raw))
    x_valid <- x_num[!is.na(x_num)]
    data.frame(
      variable = v,
      n_valid  = length(x_valid),
      n_miss   = sum(is.na(x_num)),
      mean     = if (length(x_valid) > 0) round(mean(x_valid), 2)                        else NA_real_,
      sd       = if (length(x_valid) > 0) round(sd(x_valid), 2)                          else NA_real_,
      min      = if (length(x_valid) > 0) round(min(x_valid), 2)                         else NA_real_,
      p25      = if (length(x_valid) > 0) round(unname(quantile(x_valid, 0.25)), 2)      else NA_real_,
      median   = if (length(x_valid) > 0) round(median(x_valid), 2)                      else NA_real_,
      p75      = if (length(x_valid) > 0) round(unname(quantile(x_valid, 0.75)), 2)      else NA_real_,
      max      = if (length(x_valid) > 0) round(max(x_valid), 2)                         else NA_real_,
      stringsAsFactors = FALSE
    )
  })
}

# Frequency table for one discrete / factor variable.
# Returns data.frame: value, n, pct (% of non-missing rows).
# Preserves factor level order; handles all-NA gracefully.
summarize_discrete <- function(ds, var) {
  x       <- ds[[var]]
  n_miss  <- sum(is.na(x))
  n_valid <- length(x) - n_miss
  if (n_valid == 0) {
    freq <- data.frame(value = character(0), n = integer(0), pct = numeric(0),
                       stringsAsFactors = FALSE)
  } else {
    tbl  <- table(x, useNA = "no")
    freq <- as.data.frame(tbl, stringsAsFactors = FALSE)
    colnames(freq) <- c("value", "n")
    # Preserve factor order if available; otherwise sort by n descending
    if (is.factor(x)) {
      lvl_order <- levels(x)
      freq <- freq[match(lvl_order, freq$value), ]
      freq <- freq[!is.na(freq$value), ]
    } else {
      freq <- freq[order(-freq$n), ]
    }
    freq$pct <- round(freq$n / n_valid * 100, 1)
  }
  attr(freq, "n_miss")  <- n_miss
  attr(freq, "n_valid") <- n_valid
  freq
}

# Thin wrapper: knitr::kable() + Bootstrap striped/condensed styling.
styled_kable <- function(...) {
  knitr::kable(...) |>
    kableExtra::kable_styling(
      bootstrap_options = c("striped", "hover", "condensed"),
      full_width        = FALSE,
      position          = "center"
    )
}

# Prevalence table for multiple binary logical (TRUE/FALSE) variables.
# Returns one row per variable: condition, n_yes, pct_yes, n_no, pct_no, n_miss.
# NOTE: cc_* columns are stored as R logical, not factor "Yes"/"No".
prevalence_table <- function(ds, vars, labels = NULL) {
  purrr::map_dfr(vars, function(v) {
    x       <- ds[[v]]
    n_miss  <- sum(is.na(x))
    n_valid <- length(x) - n_miss
    n_yes   <- sum(x == TRUE,  na.rm = TRUE)
    n_no    <- sum(x == FALSE, na.rm = TRUE)
    data.frame(
      condition = if (!is.null(labels) && v %in% names(labels)) labels[v] else v,
      n_yes     = n_yes,
      pct_yes   = if (n_valid > 0) round(n_yes / n_valid * 100, 1) else NA_real_,
      n_no      = n_no,
      pct_no    = if (n_valid > 0) round(n_no  / n_valid * 100, 1) else NA_real_,
      n_miss    = n_miss,
      stringsAsFactors = FALSE
    )
  })
}

Data

Code
ds0 <- arrow::read_parquet(path_parquet)
cat("Parquet loaded: ", nrow(ds0), "rows x", ncol(ds0), "cols\n")
Parquet loaded:  63843 rows x 70 cols

Data Context

Parquet table: cchs_analytic
Rows: 63,843  |  Columns: 69
Cycles: CCHS 2010 + CCHS 2014 (pooled)
Source: data-private/derived/cchs-2-tables/cchs_analytic.parquet
Sample size by survey cycle
CCHS cycle N % (of valid)
2010-2011 32621 51.1
2013-2014 31222 48.9
Analytic completeness flags
Completeness flag N TRUE N FALSE N missing
flag_complete_ccc flag_complete_ccc 42064 21779 0
flag_complete_predictors flag_complete_predictors 59309 4534 0
flag_analytic_complete flag_analytic_complete 39702 24141 0

1. Outcomes

1.1 Primary and Sensitivity Outcomes

days_absent_total is the primary outcome: total workdays absent due to any health reason in the past 2 weeks (LOP module). days_absent_chronic counts only absences attributable to chronic conditions.

Code
outcome_vars    <- intersect(c("days_absent_total", "days_absent_chronic"), names(ds0))
t_outcomes_summary <- summarize_continuous(ds0, outcome_vars)

lop_vars <- intersect(
  c("lopg040", "lopg070", "lopg082", "lopg083",
    "lopg084", "lopg085", "lopg086", "lopg100"),
  names(ds0)
)
t_lop_summary <- summarize_continuous(ds0, lop_vars)

lop_labels <- c(
  lopg040 = "Chronic condition",
  lopg070 = "Injury",
  lopg082 = "Cold",
  lopg083 = "Flu / influenza",
  lopg084 = "Stomach flu / gastroenteritis",
  lopg085 = "Respiratory infection",
  lopg086 = "Other infectious disease",
  lopg100 = "Other physical / mental health reason"
)
t_lop_summary$label <- lop_labels[t_lop_summary$variable]
Table 1.1 — Summary statistics: primary and sensitivity outcomes
Variable N valid N missing Mean SD Min P25 Median P75 Max
days_absent_total 63843 0 1.35 4.19 0 0 0 1 63
days_absent_chronic 63843 0 0.41 2.73 0 0 0 0 31

1.2 LOP Component Variables

The eight raw LOP components contributing to days_absent_total. Each measures days absent for a specific health reason. High missingness is structural: the LOP module is administered only to currently employed respondents who reported any absence.

Table 1.2 — Summary statistics: LOP component variables
Reason for absence Variable N valid N missing Mean SD Min P25 Median P75 Max
Chronic condition lopg040 63843 0 0.41 2.73 0 0 0 0 31
Injury lopg070 63843 0 0.24 2.09 0 0 0 0 31
Cold lopg082 63843 0 0.16 0.66 0 0 0 0 11
Flu / influenza lopg083 63843 0 0.10 0.61 0 0 0 0 11
Stomach flu / gastroenteritis lopg084 63843 0 0.06 0.40 0 0 0 0 11
Respiratory infection lopg085 63843 0 0.04 0.45 0 0 0 0 11
Other infectious disease lopg086 63843 0 0.03 0.40 0 0 0 0 11
Other physical / mental health reason lopg100 63843 0 0.32 1.84 0 0 0 0 21

2. Chronic Conditions (Primary Exposure)

Seventeen of the 19 requested chronic conditions are available in the PUMF. Two are suppressed for confidentiality (ccc_300 — other mental illness; ccc_185 — digestive disease) and are absent from this dataset. All cc_* columns are logical (TRUE/FALSE); prevalence percentages exclude missing values.

Code
# cc_* columns are logical (TRUE / FALSE), not factor "Yes" / "No"
cc_vars <- intersect(
  c("cc_asthma", "cc_fibromyalgia", "cc_arthritis", "cc_back_problems",
    "cc_hypertension", "cc_migraine", "cc_copd", "cc_diabetes",
    "cc_heart_disease", "cc_cancer", "cc_ulcer", "cc_stroke",
    "cc_bowel_disorder", "cc_fatigue_syndrome", "cc_chem_sensitivity",
    "cc_mood_disorder", "cc_anxiety"),
  names(ds0)
)

cc_labels <- c(
  cc_asthma            = "Asthma",
  cc_fibromyalgia      = "Fibromyalgia",
  cc_arthritis         = "Arthritis (excl. fibromyalgia)",
  cc_back_problems     = "Back problems",
  cc_hypertension      = "Hypertension",
  cc_migraine          = "Migraine",
  cc_copd              = "COPD / chronic bronchitis / emphysema",
  cc_diabetes          = "Diabetes",
  cc_heart_disease     = "Cardiovascular / heart disease",
  cc_cancer            = "Cancer (any type)",
  cc_ulcer             = "Intestinal / stomach ulcer",
  cc_stroke            = "Stroke",
  cc_bowel_disorder    = "Bowel disorder (Crohn\u2019s / colitis / IBS)",
  cc_fatigue_syndrome  = "Chronic fatigue syndrome (CFS)",
  cc_chem_sensitivity  = "Multiple chemical sensitivities (MCS)",
  cc_mood_disorder     = "Mood disorder (depression / bipolar)",
  cc_anxiety           = "Anxiety disorder (phobia / OCD / panic)"
)

t_chronic_conditions <- prevalence_table(ds0, cc_vars, labels = cc_labels)
Table 2.1 — Prevalence of 17 available chronic conditions (17 of 19 from §2.2 available in PUMF)
Condition Yes (n) Yes (%) No (n) No (%) Missing (n)
cc_asthma Asthma 5181 8.1 58623 91.9 39
cc_fibromyalgia Fibromyalgia 732 1.1 63051 98.9 60
cc_arthritis Arthritis (excl. fibromyalgia) 8312 13.0 55390 87.0 141
cc_back_problems Back problems 11524 18.1 52274 81.9 45
cc_hypertension Hypertension 8960 14.1 54740 85.9 143
cc_migraine Migraine 6699 10.5 57112 89.5 32
cc_copd COPD / chronic bronchitis / emphysema 1201 2.8 41487 97.2 21155
cc_diabetes Diabetes 3043 4.8 60771 95.2 29
cc_heart_disease Cardiovascular / heart disease 1776 2.8 61973 97.2 94
cc_cancer Cancer (any type) 706 1.1 63088 98.9 49
cc_ulcer Intestinal / stomach ulcer 1441 2.3 62309 97.7 93
cc_stroke Stroke 248 0.4 63569 99.6 26
cc_bowel_disorder Bowel disorder (Crohn’s / colitis / IBS) 2950 4.6 60826 95.4 67
cc_fatigue_syndrome Chronic fatigue syndrome (CFS) 551 0.9 63226 99.1 66
cc_chem_sensitivity Multiple chemical sensitivities (MCS) 1670 2.6 62081 97.4 92
cc_mood_disorder Mood disorder (depression / bipolar) 4232 6.6 59548 93.4 63
cc_anxiety Anxiety disorder (phobia / OCD / panic) 3485 5.5 60285 94.5 73

Note: Two conditions from §2.2 are absent from the PUMF and not shown: other mental illness (ccc_300) and digestive disease (ccc_185). Both require RDC access.


3. Predisposing Variables

Predisposing variables characterise the respondent’s socio-demographic background. Student status (sdcdgstud) is suppressed in the PUMF and renders as all-NA. dhhdfc12p (children ≥ 12 yrs) has no PUMF equivalent and is absent. See Variable Inclusion §4 for full traceability.

Code
pred_discrete_vars <- intersect(
  c("age_group_3", "sex", "marital_status", "household_size",
    "education", "immigration_status", "visible_minority", "home_ownership",
    "living_arrangements"),
  names(ds0)
)
t_pred_freq <- lapply(pred_discrete_vars, function(v) summarize_discrete(ds0, v))
names(t_pred_freq) <- pred_discrete_vars

# Raw PUMF age group code — treated as ordered factor for frequency table
if ("dhhgage" %in% names(ds0)) {
  dhhgage_levels <- sort(unique(na.omit(ds0[["dhhgage"]])))
  dhhgage_factor <- factor(ds0[["dhhgage"]], levels = dhhgage_levels)
  tmp_freq <- summarize_discrete(data.frame(dhhgage = dhhgage_factor), "dhhgage")
  dhhgage_brackets <- c(
    "2"  = "15\u201317 yrs", "3"  = "18\u201319 yrs", "4"  = "20\u201324 yrs",
    "5"  = "25\u201329 yrs", "6"  = "30\u201334 yrs", "7"  = "35\u201339 yrs",
    "8"  = "40\u201344 yrs", "9"  = "45\u201349 yrs", "10" = "50\u201354 yrs",
    "11" = "55\u201359 yrs", "12" = "60\u201364 yrs", "13" = "65\u201369 yrs",
    "14" = "70\u201374 yrs", "15" = "75\u201379 yrs"
  )
  t_dhhgage_freq <- data.frame(
    code    = tmp_freq$value,
    bracket = dhhgage_brackets[as.character(tmp_freq$value)],
    n       = tmp_freq$n,
    pct     = tmp_freq$pct,
    stringsAsFactors = FALSE
  )
} else {
  t_dhhgage_freq <- data.frame(code = character(0), bracket = character(0),
                                n = integer(0), pct = numeric(0),
                                stringsAsFactors = FALSE)
}

# Children in household by age band. Despite the "count" naming inherited from
# the PUMF documentation, DHHGLE5 / DHHG611 / DHHGL12 are BINARY 0/1 presence
# flags (0 = none, 1 = one or more). Treated as ordered factors here.
make_count_freq <- function(ds, var) {
  if (!var %in% names(ds)) return(NULL)
  vals   <- sort(unique(na.omit(ds[[var]])))
  f      <- factor(ds[[var]], levels = vals)
  summarize_discrete(data.frame(x = f), "x")
}
t_children_le5  <- make_count_freq(ds0, "dhhgle5")
t_children_6_11 <- make_count_freq(ds0, "dhhg611")
t_children_l12  <- make_count_freq(ds0, "dhhgl12")

# student_status: suppressed in PUMF; create all-NA stub for QMD guard
if ("student_status" %in% names(ds0)) {
  t_student_status <- summarize_discrete(ds0, "student_status")
} else {
  t_student_status <- data.frame(value = character(0), n = integer(0), pct = numeric(0),
                                  stringsAsFactors = FALSE)
  attr(t_student_status, "n_miss")  <- nrow(ds0)
  attr(t_student_status, "n_valid") <- 0L
}
age_group_3 — Ordered factor: 15-24 / 25-54 / 55-75
Age group N % (of valid)
15-24 9662 15.1
25-54 37101 58.1
55-75 17080 26.8
sex — Binary: Male / Female
Sex N % (of valid)
Male 31540 49.4
Female 32303 50.6
marital_status — Single / Married / Common-law / Widowed-Divorced-Separated
Marital status N % (of valid)
Married 28416 44.6
Common-law 7537 11.8
Widowed / Separated / Divorced 8043 12.6
Single / Never married 19722 31.0
household_size — Ordered: 1 / 2 / 3 / 4 / 5+
Household size N % (of valid)
1 person 14075 22.1
2 persons 23684 37.1
3 persons 10709 16.8
4 persons 10469 16.4
5 or more persons 4884 7.7
education — Ordered: Less than secondary → Post-secondary graduate
Education level N % (of valid)
Less than secondary 7348 11.6
Secondary graduate 11778 18.6
Some post-secondary 4341 6.9
Post-secondary graduate 39774 62.9
immigration_status — Non-immigrant / Immigrant / Non-permanent resident
Immigration status N % (of valid)
Non-immigrant (Canadian-born) 55066 86.8
Long-term immigrant (10+ yrs in Canada) 6317 10.0
Recent immigrant (0-9 yrs in Canada) 2092 3.3
visible_minority — White / Visible minority
Ethnic origin N % (of valid)
White 54105 85.4
Visible minority 9259 14.6
home_ownership — Dwelling owned by a member of the household
Home ownership N % (of valid)
Owner 50101 78.7
Renter 13576 21.3
Note

home_ownership derives from DHH_OWN, which is present in both cycles. “Renter” means “not owned by a member of the household” and therefore also covers band housing and rent-free arrangements; it is not a tenure-type breakdown. Not-stated responses are SPSS system-missing in 2010-2011 but explicit codes 7/8/9 in 2013-2014; both are mapped to NA by the Ellis recode.

living_arrangements — 8-level household arrangement factor
Living arrangements N % (of valid)
Unattached, living alone 14064 22.2
Unattached, living with others 2349 3.7
Couple, no children 19395 30.5
Couple with children 13776 21.7
Single parent with child 2056 3.2
Child in parent / sibling household 2354 3.7
Child in two-parent / sibling household 6781 10.7
Other arrangement 2713 4.3

All-NA variable. student_status is all-missing. sdcdgstud is suppressed in the CCHS PUMF; requires RDC access.

dhhgage — Raw PUMF age group code
Code Age bracket N % (of valid)
2 15–17 yrs 2349 3.7
3 18–19 yrs 2236 3.5
4 20–24 yrs 5077 8.0
5 25–29 yrs 5886 9.2
6 30–34 yrs 5556 8.7
7 35–39 yrs 6348 9.9
8 40–44 yrs 6290 9.9
9 45–49 yrs 5562 8.7
10 50–54 yrs 7459 11.7
11 55–59 yrs 7760 12.2
12 60–64 yrs 5543 8.7
13 65–69 yrs 2626 4.1
14 70–74 yrs 1048 1.6
15 75–79 yrs 103 0.2
dhhgle5 — Any child aged ≤ 5 in household (0 = none, 1 = one or more)
Presence (0/1) N % (of valid)
0 55089 86.3
1 8754 13.7
dhhg611 — Any child aged 6–11 in household (0 = none, 1 = one or more)
Presence (0/1) N % (of valid)
0 54678 85.6
1 9165 14.4
dhhgl12 — Any child aged under 12 in household (0 = none, 1 = one or more)
Presence (0/1) N % (of valid)
0 49264 77.2
1 14579 22.8

Note on the three child-presence flags: dhhgle5, dhhg611, and dhhgl12 are binary 0/1 presence indicators (0 = no such child in the household, 1 = one or more), not counts of children. All three are fully populated (0 missing across 63,843 rows).

Note on dhhgl12 redundancy: dhhgl12 denotes a child under 12 and is a deterministic function of the other two flags — dhhgl12 == (dhhgle5 | dhhg611) holds in all 63,843 rows, with zero discordant cases. Its marginal (22.8% positive) is therefore fully determined by the two component marginals (13.7% and 14.4%) and their overlap (3,340 households with both). Read it as a summary of the two, never as a third independent household characteristic.

Note on missing household variables: dhhdfc12p (children ≥ 12 yrs) has no PUMF equivalent and is a different construct from dhhgl12. See Variable Inclusion §4.


4. Facilitating Variables

Facilitating variables describe health-system access, health behaviours, and labour-market context. All 12 facilitating variables are populated in the current pipeline output. See Variable Inclusion §5 for traceability.

Code
facil_discrete_vars <- intersect(
  c("income_hh", "has_family_doctor", "employment_type", "work_schedule",
    "smoking_status", "bmi_category", "physical_activity",
    "alcohol_type", "fruit_veg_daily", "occupation_category",
    "work_stress", "province"),
  names(ds0)
)
t_facil_freq <- lapply(facil_discrete_vars, function(v) summarize_discrete(ds0, v))
names(t_facil_freq) <- facil_discrete_vars

t_bmi_continuous <- if ("hwtgbmi" %in% names(ds0)) {
  summarize_continuous(ds0, "hwtgbmi")
} else {
  data.frame()
}
income_hh — 5-category derived household income (< $20k → $80k+)
Household income category N % (of valid)
No income or < $20,000 2392 4.0
$20,000 - $39,999 8067 13.6
$40,000 - $59,999 10520 17.7
$60,000 - $79,999 10075 17.0
$80,000 + 28372 47.7
has_family_doctor — Yes / No
Has regular family doctor N % (of valid)
Yes 35800 85.6
No 6006 14.4
employment_type — Employee / Self-employed (PUMF LBSG31, 2 levels)
Employment type N % (of valid)
Employee 49698 82.9
Self-employed 10266 17.1
work_schedule — Full-time / Part-time
Work schedule N % (of valid)
Full-time 47936 80.7
Part-time 11453 19.3
smoking_status — Ordered: Never / Former / Occasional / Daily
Smoking status N % (of valid)
Never smoked 23446 36.8
Former 25717 40.3
Occasional 3460 5.4
Daily 11117 17.4
bmi_category — Ordered: Underweight / Normal weight / Overweight / Obese
BMI category N % (of valid)
Underweight 1110 1.9
Normal weight 25153 42.3
Overweight 20395 34.3
Obese 12743 21.5
hwtgbmi — Continuous BMI (continuous underlying variable)
Variable N valid N missing Mean SD Min P25 Median P75 Max
hwtgbmi 62756 1087 43.58 128.21 13.15 22.78 25.63 29.45 999.99
physical_activity — Ordered: Active / Moderately active / Inactive
Physical activity level N % (of valid)
Active 18610 29.2
Moderately active 16593 26.0
Inactive 28619 44.8
alcohol_type — Former or never / Occasional / Regular drinker
Alcohol use N % (of valid)
Regular drinker 44214 69.5
Occasional drinker 10245 16.1
Did not drink in past 12 months 9127 14.4
fruit_veg_daily — 3-cat derived: < 5 / 5–10 / > 10 servings per day
Fruit & vegetable consumption N % (of valid)
Less than 5 per day 36835 59.7
5 to 10 per day 22456 36.4
More than 10 per day 2377 3.9
occupation_category — 5-group PUMF occupation (LBSGSOC)
Occupation category N % (of valid)
Management / Education / Arts 20850 34.9
Business / Finance 10590 17.7
Sales / Services 14468 24.2
Trades / Transport 8674 14.5
Primary industry / Processing 5126 8.6
work_stress — Ordered: Not at all → Extremely stressful (GEN_09)
Work stress level N % (of valid)
Not at all stressful 6407 10.1
Not very stressful 12854 20.2
A bit stressful 27206 42.8
Quite a bit stressful 14419 22.7
Extremely stressful 2697 4.2
province — 13-level factor (includes Nunavut and NWT combined)
Province / territory N % (of valid)
NL 1798 2.8
PEI 991 1.6
NS 2324 3.6
NB 2252 3.5
QC 11243 17.6
ON 20518 32.1
MB 3838 6.0
SK 4032 6.3
AB 7078 11.1
BC 7714 12.1
YK 2055 3.2
NT 0 0.0
NU 0 0.0

5. Needs Variables

Needs variables capture perceived health status and functional limitations. ADL items use semantic names after Ellis renaming (adl_01 → adl_meals, etc.). All ADL items are binary Yes/No factors.

Code
needs_discrete_vars <- intersect(
  c("health_perceived", "mental_health_perceived", "health_vs_prior_year",
    "injured_past_12m"),
  names(ds0)
)
t_needs_freq <- lapply(needs_discrete_vars, function(v) summarize_discrete(ds0, v))
names(t_needs_freq) <- needs_discrete_vars

adl_vars <- intersect(
  c("adl_meals", "adl_errands", "adl_housework",
    "adl_personal_care", "adl_moving_indoors", "adl_finances"),
  names(ds0)
)
t_adl_freq <- lapply(adl_vars, function(v) summarize_discrete(ds0, v))
names(t_adl_freq) <- adl_vars

adl_labels <- c(
  adl_meals          = "Meal preparation (ADL_01)",
  adl_errands        = "Appointments / errands (ADL_02)",
  adl_housework      = "Housework (ADL_03)",
  adl_personal_care  = "Personal care (ADL_04)",
  adl_moving_indoors = "Moving inside home (ADL_05)",
  adl_finances       = "Personal finances (ADL_06)"
)
health_perceived — Ordered: Excellent → Poor (GEN_01)
Self-perceived general health N % (of valid)
Excellent 14285 22.4
Very good 26788 42.0
Good 18284 28.7
Fair 3871 6.1
Poor 575 0.9
mental_health_perceived — Ordered: Excellent → Poor (GEN_02B)
Self-perceived mental health N % (of valid)
Excellent 22501 35.3
Very good 24708 38.7
Good 13471 21.1
Fair 2657 4.2
Poor 433 0.7
health_vs_prior_year — Ordered: Much better → Much worse (GEN_02)
Health vs. prior year N % (of valid)
Much better 5179 8.1
Somewhat better 8042 12.6
About the same 45052 70.6
Somewhat worse 5054 7.9
Much worse 467 0.7
injured_past_12m — Yes / No (INJ_01)
Injured in past 12 months N % (of valid)
No 53204 83.4
Yes 10603 16.6
Table 5.5 — Activity limitations (ADL items; Yes = limitation reported)
Response N % (of valid) ADL item
No 63349 99.2 Meal preparation (ADL_01)
Yes 493 0.8 Meal preparation (ADL_01)
No 62865 98.5 Appointments / errands (ADL_02)
Yes 971 1.5 Appointments / errands (ADL_02)
No 62382 97.7 Housework (ADL_03)
Yes 1447 2.3 Housework (ADL_03)
No 63526 99.5 Personal care (ADL_04)
Yes 315 0.5 Personal care (ADL_04)
No 63532 99.5 Moving inside home (ADL_05)
Yes 308 0.5 Moving inside home (ADL_05)
No 63358 99.3 Personal finances (ADL_06)
Yes 474 0.7 Personal finances (ADL_06)

6. Survey Design Variables

Code
weight_vars <- intersect(c("wts_m", "wts_m_pooled"), names(ds0))
t_weights_summary <- summarize_continuous(ds0, weight_vars)

t_cycle_freq <- summarize_discrete(ds0, "cchs_cycle_f")

flag_vars <- intersect(
  c("flag_complete_ccc", "flag_complete_predictors", "flag_analytic_complete"),
  names(ds0)
)
t_flags_summary <- if (length(flag_vars) > 0) {
  data.frame(
    flag    = flag_vars,
    n_true  = sapply(flag_vars, function(v) sum(ds0[[v]] == TRUE,  na.rm = TRUE)),
    n_false = sapply(flag_vars, function(v) sum(ds0[[v]] == FALSE, na.rm = TRUE)),
    n_miss  = sapply(flag_vars, function(v) sum(is.na(ds0[[v]]))),
    stringsAsFactors = FALSE
  )
} else {
  data.frame()
}

6.1 Sampling Weights

wts_m is the per-cycle survey weight; wts_m_pooled is the pooled weight adjusted for two-cycle pooling (divide by 2 per Statistics Canada guidelines).

Survey sampling weights: wts_m (per-cycle) and wts_m_pooled (pooled across cycles)
Weight variable N valid N missing Mean SD Min P25 Median P75 Max
wts_m 63843 0 559.02 900.55 6.04 142.30 287.84 610.82 26332.62
wts_m_pooled 63843 0 279.51 450.28 3.02 71.15 143.92 305.41 13166.31

6.2 Survey Cycle

cchs_cycle_f — CCHS 2010 and 2014 pooled sample
CCHS cycle N % (of valid)
2010-2011 32621 51.1
2013-2014 31222 48.9

6.3 Completeness Flags

Three logical flags indicate whether a respondent has complete data for each analytical dimension. Use flag_analytic_complete to subset to the analytic sample.

Analytic completeness flags (TRUE = complete for that dimension)
Completeness flag N TRUE N FALSE N missing
flag_complete_ccc flag_complete_ccc 42064 21779 0
flag_complete_predictors flag_complete_predictors 59309 4534 0
flag_analytic_complete flag_analytic_complete 39702 24141 0

flag_complete_ccc — All 17 chronic condition indicators (cc_*) are non-NA. cc_copd was administered to a sub-sample only (~66% coverage), so this flag is TRUE for 42,064 of the 63,843 analytic rows. Use this flag when running models that include any cc_* predictor.

flag_complete_predictors — All key predictor variables (age, sex, education, income, immigration status, province, employment, smoking, BMI, physical activity, perceived health, etc.) are non-NA. Rows with missing values on any single predictor will have this flag set to FALSE. Covers 59,309 rows.

flag_analytic_complete — Both flag_complete_ccc AND flag_complete_predictors are TRUE. This is the recommended subsetting criterion for fully complete-case analyses. Covers 39,702 rows (~62% of the analytic sample).

All three flags are pre-computed in the Ellis script. No need to re-derive exclusion logic in downstream analyses — simply filter on the relevant flag.


7. Clustered Missingness Audit

Context (Marc-André, 2026-05-15): Several variables share a similar level of missingness (~30%). This section audits whether these form a coherent cluster and documents the mechanism for each — primarily age-gated questions that were only administered to respondents above a certain age threshold.

7.1 Age-Gated Variables

The following variables were administered conditionally based on respondent age:

Variable Threshold Mechanism Coverage
cc_copd (CCC_091) 35+ years (DHHGAGE ≥ 8) COPD question not asked to younger respondents ~66%
bmi_category (HWTGISW) 18+ years (DHHGAGE ≥ 3) BMI derived only for adults 18+ ~95%

7.2 Other Missingness Mechanisms

Variable Mechanism Notes
income_hh (INCGHH) Non-response / refusal Income is sensitive; ~5% refuse
immigration_status NOT STATED in source ~3% codes 9/99 → NA
occupation_category (LBSGSOC) Not applicable for some employment types Self-employed with no SOC code
fruit_veg_daily (FVCGTOT) Partial module administration ~10% missing across cycles
smoking_status (SMKDSTY) Complex derived variable Requires valid responses to multiple source items

7.3 Interpretation

The ~30% missingness cluster is dominated by cc_copd (age-gated, 34% missing). When this condition is excluded from the complete-case flag, flag_complete_ccc would rise from 66% to approximately 95%. Analysts working exclusively with conditions other than COPD should consider subsetting on the 16 remaining conditions rather than using flag_complete_ccc which penalizes younger respondents.

For COPD-inclusive models, restrict to respondents aged 35+ (DHHGAGE ≥ 8) and impute cc_copd = FALSE for the younger subsample, following the recommendation from the 2026-05-15 review session.