CCHS Pipeline — CACHE Manifest

This document describes the analysis-ready dataset produced by manipulation/2-ellis.R. It is the authoritative reference for downstream analyses in analysis/.

Status: Populated — statistics refreshed from 2-ellis.R run 2026-05-20 (after SDCFIMM fix; data-primer-1 extension adds 4 facilitating vars + ADL rename + work_stress). All 24 tests passing.

Output Summary

Field Value
SQLite database data-private/derived/cchs-2.sqlite
Table name cchs_analytic
Parquet file data-private/derived/cchs-2-tables/cchs_analytic.parquet
Sample flow table cchs-2.sqlite (table: sample_flow) + sample_flow.parquet
Unit of observation One row per CCHS respondent
Columns 70
Analytic n (unweighted) 63,843
Weighted N (sum of wts_m_pooled) 17,844,913
CCHS cycles pooled 2010-2011 and 2013-2014

Sample Construction

Sample exclusion was applied in the following order (see sample_flow table):

Step Criterion n remaining n excluded
0 Full pooled sample (2010 + 2014) 126,431 —
1 Age 15–75 (DHHGAGE codes 2–15) 112,352 14,079
2 Employed in past 3 months (LOP_015 = 1) 64,248 48,104
3 Exclude proxy respondents (ADM_PRX = 1) 64,248 0
4 Complete outcome data (all 8 LOP components) 63,843 405

Note: Steps 5 and 6 in the Ellis script (completeness of CCC indicators and key predictors) create flags (flag_complete_ccc, flag_complete_predictors, flag_analytic_complete) without excluding rows. They are not recorded in the sample_flow table.

Reference final n from the initial exploration of the data: 64,141. Observed n: 63,843 — deviation of 298 rows (within the ±5,000 warning threshold).

Survey Weights

Column Description
wts_m Original master weight from Statistics Canada PUMF
wts_m_pooled Pooling-adjusted weight = wts_m / 2 (two cycles pooled)

Bootstrap weights: Not available for CCHS 2010 and 2014 PUMF. Variance estimates must rely on master weight only. This is a known limitation.

Outcome Variable

Column Description Range Missing
days_absent_total Total workdays absent in past 3 months (any health reason) 0–63 (cap 90) None
days_absent_chronic Workdays absent due to chronic condition only 0–31 (cap 90) None

Construction formula:

days_absent_total = lopg040 + lopg070 + lopg082 + lopg083 +
                    lopg084 + lopg085 + lopg086 + lopg100

Reference from the initial exploration of the data (Table 2):

  • Mean = 1.35 (SE = 0.02)
  • Zero proportion = 70.59%
  • Variance = 17.7 / SD = 4.19

Observed in this run (2026-05-20):

Statistic days_absent_total days_absent_chronic
Mean (unweighted) 1.35 0.414
Zero proportion 70.49% 94.32%
Max observed 63 31
Missing (NA) 0 0

LOP Component Columns (Raw, Retained for Sensitivity Checks)

Column Description
lopg040 Days lost: chronic condition
lopg070 Days lost: injury
lopg082 Days lost: cold / runny nose
lopg083 Days lost: flu / influenza
lopg084 Days lost: stomach flu
lopg085 Days lost: respiratory infection
lopg086 Days lost: other infectious disease
lopg100 Days lost: other physical or mental health reason

Chronic Condition Indicators

All chronic condition columns are logical type (TRUE / FALSE / NA). NAs are present: cc_copd was administered to a sub-sample only (~70% coverage), so ~21,779 rows have at least one NA among the 17 cc_* columns. Use flag_complete_ccc to subset the 42,064 rows where all 17 indicators are non-NA.

Column CCC source Condition
cc_asthma CCC_031 Asthma
cc_fibromyalgia CCC_041 Fibromyalgia
cc_arthritis CCC_051 Arthritis
cc_back_problems CCC_061 Back problems (excl. fibromyalgia / arthritis)
cc_hypertension CCC_071 High blood pressure
cc_migraine CCC_081 Migraine
cc_copd CCC_091 COPD
cc_diabetes CCC_101 Diabetes
cc_heart_disease CCC_121 Heart disease
cc_cancer CCC_131 Cancer
cc_ulcer CCC_141 Stomach / intestinal ulcer
cc_stroke CCC_151 Stroke effects
cc_bowel_disorder CCC_171 Bowel disorder (Crohn’s / colitis)
cc_fatigue_syndrome CCC_251 Chronic fatigue syndrome
cc_chem_sensitivity CCC_261 Multiple chemical sensitivities
cc_mood_disorder CCC_280 Mood disorder
cc_anxiety CCC_290 Anxiety disorder

Note on 19th condition: The research instrument refers to 19 chronic conditions. The mapping above yields 17 from clearly identified CCC variables. Heart disease (cc_heart_disease) and stroke (cc_stroke) may constitute the “cardiovascular disease/stroke” category counted as two or one. Verify against Appendix 3 of the thesis before finalizing analytic models.

Predictor Variables

Predisposing

Column Source Levels / Range n (non-NA)
dhhgage DHHGAGE Integer codes 2–15 (not year values; 2=15-17 yrs, 15=75-79 yrs) 63,843
age_group_3 Derived 15-24 (9,662), 25-54 (37,101), 55-75 (17,080) 63,843
sex DHH_SEX Male (31,540), Female (32,303) 63,843
marital_status DHHGMS Married (28,416), Common-law (7,537), Widowed/Sep/Div (8,043), Single (19,722) 63,718
household_size DHHGHSZ 1 (14,075), 2 (23,684), 3 (10,709), 4 (10,469), 5+ (4,884) 63,821
dhhgle5 DHHGLE5 Binary 0/1 presence flag — any child ≤ 5 in household: 0 (55,089), 1 (8,754) 63,843
dhhg611 DHHG611 Binary 0/1 presence flag — any child 6-11 in household: 0 (54,678), 1 (9,165) 63,843
dhhgl12 DHHGL12 Binary 0/1 presence flag — any child under 12 in household: 0 (49,264), 1 (14,579) 63,843
home_ownership DHH_OWN Owner (50,101), Renter (13,576) 63,677
education EDUDR04 Less than secondary (7,348), Secondary graduate (11,778), Some post-secondary (4,341), Post-secondary graduate (39,774) 63,241
immigration_status SDCFIMM + SDCGRES Non-immigrant (55,066), Long-term immigrant (6,317), Recent immigrant (2,092) 63,475
visible_minority SDCGCGT White (54,105), Visible minority (9,259) 63,364

QC finding (2026-08-01) — the three child-presence flags are not counts, and dhhgl12 is redundant: All three of dhhgle5, dhhg611, and dhhgl12 arrive from the PUMF as binary 0/1 presence indicators, not as counts of children; earlier revisions of this manifest described them as counts. All three are complete (0 missing across 63,843 rows). Furthermore, dhhgl12 is a deterministic function of the other two: dhhgl12 == (dhhgle5 | dhhg611) holds for all 63,843 rows with zero discordant cases. Its unweighted correlation with dhhgle5 is 0.733 and with dhhg611 is 0.753. A design matrix built from ~ dhhgle5 + dhhg611 + dhhgl12 spans exactly the same column space as ~ dhhgle5 * dhhg611 (max residual 1.3e-10), so dhhgl12 carries no main-effect information beyond its two components — it merely re-expresses their interaction. Do not read a coefficient on dhhgl12 as an independent “young children” effect when the other two flags are in the same model.

Naming caution: DHHGL12 means children less than 12 years old. It is not the requested “children ≥ 12 yrs” construct (dhhdfc12p), which has no PUMF equivalent in either cycle. See §4 of the Variable Inclusion report.

Analytic disposition (ratified 2026-08-01): dhhgl12 is retained for descriptive reporting and for the Section 5.3 bivariate series, where its rate ratio is a legitimate marginal quantity, but it is withheld from the Section 5.4 penalised selection. Penalised selection among deterministically redundant columns splits a shared coefficient arbitrarily between them. The split is implemented in scripts/modeling/candidate-registry.R via bivariate_only_vars; included_vars (49) drives descriptives and bivariate models, lasso_vars (48) drives LASSO.

New variable (2026-08-01) — home_ownership admitted: DHH_OWN is present in both cycles and satisfies the Project Proposal §2.2 “homeownership” requirement directly. Earlier revisions of the Variable Inclusion report stated that no house-ownership construct existed in the CCHS PUMF; that claim was wrong and has been retracted. The variable label text differs across cycles (2010-2011: “Dwelling - owned by a member of hhld”, 1 = YES / 2 = NO; 2013-2014: “Owned, Rented”, 1 = OWNER / 2 = RENTED) but the integer coding is identical, so no alias resolution is required.

Missingness is represented differently by cycle and the Ellis recode must catch both forms: 2010-2011 stores refusal / not-stated as SPSS system missing (→ NA after haven::zap_labels() in the Ferry), whereas 2013-2014 stores them as explicit codes 7 / 8 / 9. The recode therefore maps 1 → Owner, 2 → Renter, and everything else → NA; it must not be simplified to dhh_own != 1 ~ "Renter", which would silently absorb the not-stated codes into the Renter category. Coverage in the final analytic table is 99.74% (63,677 of 63,843; 68 missing in 2010-2011, 98 in 2013-2014). No optional-content aliasing was detected — every province × cycle cell exceeds 99.3% coverage.

Fix applied (2026-05-20) — immigration_status construction: SPSS stores SDCGRES code 6 (“NOT APPLICABLE” = Canadian-born) as system missing, which becomes NA after haven::zap_labels() in the Ferry. The previous recode sdcgres == 6 ~ "Non-immigrant" therefore never fired, leaving ~86% of analytic rows as NA. The fix uses SDCFIMM == 2 (NO, not an immigrant) to identify non-immigrants, resolving near-complete coverage. SDCFIMM was added to vars_inferred and is retained as raw column sdcfimm in the output.

Facilitating

Column Source Levels / Range n (non-NA)
province GEOGPRV NL, PEI, NS, NB, QC, ON, MB, SK, AB, BC, YK, NT, NU (13 levels) 63,843
income_hh INCGHH < $20K (2,392), $20-39K (8,067), $40-59K (10,520), $60-79K (10,075), $80K+ (28,372) 59,426
has_family_doctor ACC_50A / HCU_1AA Yes (35,800), No (6,006) 41,806
work_schedule LBSDPFT Full-time (47,936), Part-time (11,453) 59,389
employment_type LBSG31 Employee (49,698), Self-employed (10,266) 59,964
occupation_category LBSGSOC Management/Education/Arts (20,850), Business/Finance (10,590), Sales/Services (14,468), Trades/Transport (8,674), Primary/Processing (5,126) 59,708
smoking_status SMKDSTY Never smoked (23,446), Former (25,717), Occasional (3,460), Daily (11,117) 63,740
living_arrangements DHHGLVG Couple, no children (19,395), Unattached alone (14,064), Couple with children (13,776), Child in 2-parent household (6,781), Unattached with others (2,349), Child in parent/sibling (2,354), Single parent (2,056), Other (2,713) 63,488
alcohol_type ALCDTTM Regular drinker (44,214), Occasional drinker (10,245), Did not drink (9,127) 63,586
fruit_veg_daily FVCGTOT Less than 5/day (36,835), 5 to 10/day (22,456), More than 10/day (2,377) 61,668
physical_activity PACDPAI Active (18,610), Moderately active (16,593), Inactive (28,619) 63,822
bmi_category HWTGISW Underweight (1,110), Normal weight (25,153), Overweight (20,395), Obese (12,743) 59,401
hwtgbmi HWTGBMI Continuous (kg/m²) —

Note — province: YK = 2,055; NT = 0; NU = 0. The NT and NU factor levels are retained in the output but contain no rows in this combined sample.

Needs

Column Source Levels / Range n (non-NA)
health_perceived GEN_01 Excellent (14,285), Very good (26,788), Good (18,284), Fair (3,871), Poor (575) 63,803
mental_health_perceived GEN_02B Excellent (22,501), Very good (24,708), Good (13,471), Fair (2,657), Poor (433) 63,770
health_vs_prior_year GEN_02 Much better, Somewhat better, About the same, Somewhat worse, Much worse —
work_stress GEN_09 Not at all stressful (6,407), Not very stressful (12,854), A bit stressful (27,206), Quite a bit stressful (14,419), Extremely stressful (2,697) 63,583
adl_meals ADL_01 No (63,349), Yes (493) 63,842
adl_errands ADL_02 No / Yes — needs help: appointments / errands —
adl_housework ADL_03 No / Yes — needs help: housework —
adl_personal_care ADL_04 No / Yes — needs help: personal care —
adl_moving_indoors ADL_05 No / Yes — needs help: moving inside home —
adl_finances ADL_06 No (63,358), Yes (474) 63,832
injured_past_12m INJ_01 No (53,204), Yes (10,603) 63,807

Survey / Cycle Variables

Column Description
cchs_cycle Integer: 0 = 2010-2011, 1 = 2013-2014
cchs_cycle_f Factor: “2010-2011”, “2013-2014”

Completeness Flags

Column Description n TRUE
flag_complete_ccc All 17 chronic condition indicators non-NA 42,064
flag_complete_predictors All key predictor variables non-NA 59,309
flag_analytic_complete Both CCC and predictor flags TRUE 39,702

Note: These flags allow analysts to subset for fully complete cases without re-running exclusion logic. Rows with flag_analytic_complete == FALSE are retained in the file for sensitivity analysis.

Usage Notes for Analysts

  • All factor levels are explicitly defined; do not rely on integer codes.
  • Perceived health variables are recoded from raw CCHS codes (1 = best, 5 = worst) to labelled factors. Output columns are health_perceived (source: GEN_01), mental_health_perceived (source: GEN_02B), and health_vs_prior_year (source: GEN_02). Excellent / Much better is the first factor level in each.
  • work_stress (source: GEN_09) is an ordered factor with 5 levels from “Not at all stressful” to “Extremely stressful”. Note: this captures self-perceived general work stress (not specifically job demands).
  • ADL limitation columns (adl_meals, adl_errands, adl_housework, adl_personal_care, adl_moving_indoors, adl_finances) are “No”/“Yes” factors. Prevalence of “Yes” is very low (~0.8%) in this employed sample.
  • smoking_status collapses SMKDSTY’s 6 codes to 4 groups: Daily, Occasional (codes 2+3), Former (codes 4+5), Never smoked.
  • occupation_category uses 2010 descriptive labels for both cycles; 2014 PUMF labels the same 5 groups only as “GROUP 1”–“GROUP 5”.
  • home_ownership (source: DHH_OWN) is a two-level factor, Owner / Renter. “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 NA in both cycles despite being encoded differently upstream — see the QC note in the Predisposing section.
  • The three child-presence flags (dhhgle5, dhhg611, dhhgl12) are numeric 0/1, not factors, and not counts. dhhgl12 is the logical OR of the other two; do not enter all three into a penalised model. See the QC note above.
  • The 17 cc_* columns are logical. Use as.integer(cc_*) to get 0/1 for regression models.
  • Always use wts_m_pooled (not wts_m) for weighted analyses.
  • No bootstrap weights are available; report confidence intervals from survey design-based variance or note this limitation in publications.
  • CCHS PUMF terms of use: results may not be published without review per your data sharing agreement with Statistics Canada.