Skip to content

Wage regressions

This analysis relates log wages to MQ across model samples, fixed-effect specifications, and relationship-tenure groups.

flowchart LR
    data[(Mode-specific disaggregated data)]
    fit[[Fit five specifications<br/>in three tenure contexts]]
    models[(Compact fits, two-way covariance,<br/>and metrics)]
    csv[(wage_regressions_metrics.csv)]
    latex[/wage_regressions.tex/]

    data --> fit --> models
    models --> csv --> latex

    classDef input fill:#eee5f5,stroke:#76528c,stroke-width:2px
    classDef code fill:#f3f3f3,stroke:#666,stroke-width:2px
    classDef support fill:#fff0cc,stroke:#a66b00,stroke-width:2px
    classDef tableOutput fill:#e2f2e7,stroke:#3b7a4b,stroke-width:2px
    class data input
    class fit code
    class models,csv support
    class latex tableOutput

One invocation produces one table for one of three samples:

  • full-training in-sample;
  • training out-of-sample;
  • training in-sample.

Each table contains panels for all relationships, tenure 0–4, and tenure 5+. Within each panel, five columns add observable controls, firm fixed effects, worker fixed effects, and worker-plus-firm fixed effects to the MQ-only model. Standard errors are clustered two ways by worker and firm. Saved metrics also record the wage interpretation of a +0.1 MQ change.

Input: Disaggregated regression data Module: analyses/modules/wage_regressions.R

Rscript pipelines/wage_regressions.R --config config/config_one_percent.yaml \
  --mode full_training --sample in_sample
Rscript pipelines/wage_regressions.R --config config/config_one_percent.yaml \
  --mode training --sample out_of_sample
Rscript pipelines/wage_regressions.R --config config/config_one_percent.yaml \
  --mode training --sample in_sample

The corresponding Slurm task requires --mode and --sample. Replace the configuration with config_full.yaml for final estimates.

/artifacts/<coverage>/analyses/wage_regression/<mode>_<sample>/
  models/
  wage_regressions_metrics.csv
  wage_regressions_table.rds
  wage_regressions.tex
  wage_regressions_metadata.yaml

A normal rerun reuses valid model and metric bundles and can format the table without reopening source data. --rerun refits every specification. Optional --shards runs write to an isolated shard-specific scope.