# Week 4 lab: evaluate the compensation rule

**Course:** Organizations, Personnel, and Internal Labor Markets.  
**Chapter:** Week 4. Pay, Incentives, Multitasking, and Relational Contracts.  
**Scope:** Standard; approximately two core hours plus a two-page proposal and compact data/contract dictionary.  
**Language:** Python standard library.  
**Prerequisites:** means, randomized assignment, basic optimization, and the distinction between promised pay and realized pay.

The economic question is how a compensation rule changes effort allocation, risk, selection and cooperation. Friebel et al. (2017) motivates the offered team-bonus exercise; Leaver et al. (2021) motivates separating recruitment from post-entry incentives. All observations, effect sizes and analytical examples here are invented teaching constructions.

From this directory:

```bash
ENV_NAME=research bash smoke.sh
```

The guaranteed route is **synthetic design reconstruction**, with `mode: synthetic_design_reconstruction` and `empirical_replication: false`. Every CSV carries `SYNTHETIC_TEACHING_NOT_PUBLISHED_ESTIMATES`. The optional original-data route was omitted: the supplied pack documented archive listings, but this installation downloaded and executed no original microdata or replication code. The 24 shops and 12 matched pairs do not reproduce Friebel et al.'s original assignment design.

## Run order

```bash
conda run -n research --live-stream python src/offline_lab.py --out . --seed 20260921
conda run -n research --live-stream python src/smoke-checks.py
```

`--out` names a lab root, not the `output/` folder. The generator writes a known inventory of files and leaves unrelated files alone. Smoke reruns it into two fresh temporary roots with the same seed, checks their contents, compares the canonical and fresh bytes, then tests seed 710. It requires no network, credentials, original records, GPU or installation. `generated-sha256.json` covers 18 explicit generated artifacts; smoke compares those plus the manifest, for 19 deterministic artifacts. Documentation, code, stale files and the smoke report itself are excluded from the generated manifest.

## Files and workflow

| Path | Content |
|---|---|
| `lab.md` | Student tasks and interpretation |
| `data/teaching/shop_week.csv`; `contract-schema.csv` | 288 shop-week observations and field dictionary |
| `data/teaching/receipt_null.csv` | 160-unit zero-effect payout-selection example |
| `data/instructor_only/shop_week_truth.csv`; `receipt-null-truth.csv` | Separate synthetic truth; never learner predictors |
| `output/reproduced/paired_itt.csv`; `pair-contrasts.csv` | Five equal-pair-weighted ITTs, pair SEs and exact sharp-null tests |
| `output/reproduced/principal_agent.csv`; `marginal_rewards.csv` | Insurance/participation and threshold arithmetic |
| `output/reproduced/source-mode-ledger.csv`; `reproduction_status.json`; root `validation.json` | Provenance and executed scope |
| `output/transfer/receipt_diagnostic.csv`; `multitask.csv` | Receipt selection and effort allocation |
| `output/transfer/selection_accounting.csv`; `relational_constraint.csv` | Known-type accounting and employer payment condition |
| `output/results.md`; `run_summary.json` | Readable results and machine-readable run summary |
| `generated-sha256.json`; `output/smoke-checks.json` | Inventory, hashes and substantive fresh-run checks |
| `transfer-memo-template.md` | Two-page proposal and compact dictionary template |

The chapter's shared teaching figure reads `output/transfer/multitask.csv`; its script and durable input copy are kept in the course assets. The core lab remains standard-library-only and does not duplicate that figure.

Gross sales is the prespecified primary outcome; hours, return costs, payroll and contribution are secondary, with unadjusted p-values. There are 12 randomized pair choices, not 288 independent assignment units. The exact test enumerates the 4,096 within-pair swaps under the sharp no-effect null and no cross-shop interference. A large p-value does not establish equivalence.

Read `transfer/data-notes.md` for DGP assumptions and `run-log.md` for actual commands/results. `source-notes.md` records adaptation from the supplied starter and the source-pack recovery limitation. No optional original-release result is packaged; legitimate files, permission, original assignment and a precise target would have to be checked before a separate empirical run.
