Happiness by gender in the GSS (draft)¶
Skeleton. This post will mirror the logic of Happiness in America and the subgroup tooling used in Gender roles in the GSS, but focus on happy (very happy vs other codes) stratified by sex (GSS sex: male / female).
TODO — framing
One paragraph on the GSS happiness question and coding (
SELECTED_VALUES).One paragraph on why gender-stratified fits (separate
time_modelandmodel10runs with--sex, or composed overlays).Short methods pointer: weighted cells, RW2 cohort–period model, nutpie sampling — link to
tech_report.mdor notebooks.
TODO — data / artifacts
Default extract and weight column (match production pipeline).
Stem / suffix tokens for stratified runs:
_sex_1/_sex_2(GSS male / female),_nc,_overallcohorts,_uniformyears; composed outputs underfigs/composed_happy_sex_Male_Female_*.png(jb/figs→notebooks/figs).
1. Time model by gender¶
Period-only time_model latent trajectories (national RW2 trend per subgroup), male vs female on one axes — output from scripts/run_composed_standardized_effects.py with --grouping sex (HDF bands from separate --sex male / --sex female runs).

Figure 1:Period-only time model: very happy share by nominal survey year, male (GSS sex = 1) vs female (2).
2. Standardized cohort model by gender¶
Cohort curve with equal weight on each observed nominal year within each gender group — same estimand as cohort_standardized_*_uniformyears in Happiness in America.

Figure 2:Standardized cohort effect for very happy by gender (uniform weights on survey years within group).
3. Standardized period trend by gender¶
Standardized period curves with within-group reference cohort mix (overallcohorts) — male vs female on one axes from scripts/run_composed_standardized_effects.py (plot_composed_standardized_period). For the period-only time model as a separate overlay-free comparison, see §1.

Figure 3:Standardized period trend for very happy by gender (fixed within-group cohort weights).
Notebook hygiene¶
TODO.
Commands:
scripts/run_time_model.py,scripts/run_model10.py --sex male|female,scripts/run_cohort_trajectories.py,scripts/run_composed_standardized_effects.py(happy, groupingsex,--with-timemodelfor composed time-model figure).Figures resolve via symlink
jb/figs→notebooks/figs; anchors::name:hapgen-time-model-by-sex,hapgen-cohort-standardized-by-sex,hapgen-time-standardized-by-sex.