# Protocol: the exposure-rate covariance the Poisson aggregate likelihood assumes away

**Target problem.** CMP-20 *Poisson aggregate likelihood needs zero exposure-rate
covariance.* Reporting standard: ADEMP (Morris, White and Crowther 2019,
[doi:10.1002/sim.8086](https://doi.org/10.1002/sim.8086)).

**Registration.** This file is committed before any replicate of the registered
grid is drawn; the commit is the timestamp. The design rationale is in
[`DESIGN.md`](DESIGN.md), written against `studies/DESIGN-STANDARD.md`. Where this
protocol departs from the design, section 7 says so and why. Every number that
comes from a probe is in [`results/probes.md`](results/probes.md), generated by
`R/03-probes.R`, and is not retyped here.

## 1. The claim and its refutation

For an aggregate Poisson arm the likelihood as implemented computes total exposure
times the mean modeled rate under the arm's reported covariate law. The true
expected count is $n\,E[T\lambda(x)]$, so the arm's expected count is wrong by the
exact factor

$$\frac{E[Y]_{\text{true}}}{E[Y]_{\text{model}}} = 1 + \rho_{T,\lambda}\,\mathrm{CV}(T)\,\mathrm{CV}(\lambda).$$

In a two-arm aggregate study the study intercept absorbs the control arm's factor,
and the treatment effect absorbs the log ratio of the two arms' factors. So the
contrast bias is

$$\text{bias} = \log\frac{1 + \rho_1\,\mathrm{CV}_1(T)\,\mathrm{CV}_1(\lambda)}{1 + \rho_0\,\mathrm{CV}_0(T)\,\mathrm{CV}_0(\lambda)},$$

zero when the product is common to both arms and nonzero when it differs.
**Refuting sentence (DESIGN.md section 1):** the omitted covariance cancels in the
reported contrast. The identity says it cancels exactly for the common part and
not for the differential part, and the study measures how large the differential
part is at plausible levels.

## 2. Data-generating mechanism

A minimal anchored network: study 1 supplies individual data on A versus C, study
2 supplies arm totals (events, total exposure) and covariate moments on B versus C.
One covariate, $x \sim N(0, 1)$ in study 1 and $N(0.5, 1)$ in study 2. Rate model

$$\log\lambda_a(x) = \mu_s + b\,x + d_a + \gamma\,x\,\mathbb{1}[a \text{ active}],$$

with $\mu = (\log 0.8, \log 1.0)$, $d_A = -0.3$, $d_B = -0.4$, $\gamma = 0.2$, and $b$ set
so the control arm's covariate-explained rate has the registered CV. Exposure is
lognormal given the covariate, $\log T = \alpha + c\,(x - m) + e$, with $c$ and
$\mathrm{Var}(e)$ solved per arm so that $\mathrm{corr}(T, \lambda)$ and $\mathrm{CV}(T)$ take
their registered values exactly and $E[T] = 1$ in every arm (`R/01-dgm.R`). A and B
share one exposure mechanism, as do the two control arms, in both studies.

| factor | levels |
|---|---|
| control-arm correlation $\rho_0$ | 0, -0.2, -0.4, -0.6 |
| differential $\rho_1 - \rho_0$ | 0, 0.2, 0.4 |
| $\mathrm{CV}(T)$ | 0.3, 0.6, 1.0 |
| control-arm $\mathrm{CV}(\lambda)$ | 0.2, 0.4, 0.8 |
| participants per arm | 250, 1000 |

216 cells fully crossed, plus 36 second-null-control cells (section 5). Cells whose
requested triple no joint law of this family attains are listed in
`results/probes.md` (P2) and are not run; they are reported, not silently
projected.

**What the mechanism makes true.** The rate model is correct apart from the
integration weighting, there is no overdispersion, reported covariate moments are
exact, and the exposure mechanism is the same in both studies. So every error is
the omitted covariance, and the borrowed method below is evaluated under the
condition that makes it work.

## 3. Estimand

The log marginal rate ratio of B versus C in the target population, study 1's
$N(0,1)$:

$$\theta = \log\frac{\int \lambda_B(x)\,dF_T}{\int \lambda_C(x)\,dF_T} = d_B + \gamma\,m_T + \{(b+\gamma)^2 - b^2\}/2,$$

in closed form, checked against Monte Carlo in P1.

## 4. Methods

All fit the same joint likelihood (individual Poisson with each participant's own
exposure as offset, plus aggregate Poisson arms), by maximum likelihood with an
analytic gradient and observed information, and differ only in the covariate law
the aggregate arms integrate over. Wald 95% intervals by the delta method.

Each aggregate arm reports its own sample mean $\bar x_a$ and variance $s_a^2$, as a
publication does.

| method | aggregate integration law | role |
|---|---|---|
| unweighted | $N(\bar x_a, s_a^2)$ | the status quo under test |
| weighted | $N(\bar x_{w,a}, s_{w,a}^2)$, the exposure-weighted sample moments | the theorem; must be unbiased everywhere |
| borrowed | $N(\bar x_a + \hat c_a s_a^2, s_a^2)$, $\hat c_a$ the slope of $\log T$ on $x$ in study 1's arm of the same type | deployable when study 1 has individual exposure |
| sensitivity | the unweighted interval shifted by the identity over a declared range $\rho \in [-0.6, 0]$ per arm, $\lvert\rho_1 - \rho_0\rvert \le 0.4$, using the fitted dispersion and each arm's observed CV of exposure | published data only |

**The declared range contains every grid value**, so the sensitivity interval covers
by construction wherever the rest of the model is right; what it can be scored on
is its width. This is stated here so a high coverage is not read as a finding.

## 5. Performance, controls and decision

Per method per cell, with Monte Carlo standard errors: bias, empirical SE, model
SE, coverage, interval width; for the unweighted arm, the bias of each aggregate
arm's absolute marginal log rate; the realized per-replicate identity value.
**$n_{sim} = 1000$** per cell: coverage MCSE 0.0069 at nominal and at most 0.016;
bias MCSE at most about 0.004. The design asked for 2000; P4 prices that at about
34 core-hours on a machine with load average near 100, and both decision thresholds
sit well outside the resulting Monte Carlo error. Common random numbers across
methods within a replicate.

**Registered identity check.** Across all run main cells, regress the unweighted
arm's cell mean error on the predicted bias of section 1. Slope 1 confirms the
mechanism.

**Controls.**

- **Null.** At $\rho_0 = \rho_1 = 0$ the unweighted arm is exact: its bias must be
  within 3 MCSE of zero and its coverage in $[0.93, 0.97]$ in every such cell.
- **Second null.** At $\gamma = 0$ and $\rho_1 = \rho_0 \neq 0$ (36 cells, 1000 per arm):
  each aggregate arm's absolute log rate must be biased by more than 3 MCSE in the
  cells where the predicted arm factor exceeds 0.02 on the log scale, **and** the
  contrast must be unbiased within 3 MCSE. Both at once.
- **Positive.** At $\rho_0 = -0.6$, differential 0.4, the largest attainable
  dispersions: unweighted bias beyond 3 MCSE and weighted bias within 3 MCSE, with
  weighted coverage in $[0.93, 0.97]$.
- **Falsifier.** The plausible subgrid defined below: if bias there stays under the
  threshold, the headline is that the assumption is violated and harmless.

**Primary outcome and decision rule.** Plausible dispersions are fixed as
$\mathrm{CV}(T) \in \{0.3, 0.6\}$ and control-arm $\mathrm{CV}(\lambda) \in \{0.2, 0.4\}$
(`R/00-config.R`). Among plausible cells with differential $\ge 0.2$:

- if any cell has unweighted bias above 0.05 on the log rate ratio (with its 95%
  Monte Carlo interval above 0.05) or coverage below 0.90, the problem is
  **confirmed material**, and the fraction of such cells is reported;
- if every such cell has bias below 0.05 and coverage within $[0.90, 0.98]$,
  materiality is **refuted** and the assumption is reported as safe in the contrast
  though violated in each arm;
- otherwise the result is **borderline** and reported as such.

The differential covariance product at which bias crosses 0.05 is reported in every
branch.

## 6. What is computed before the run

`results/probes.md`: P1 (truth against Monte Carlo), P2 (attainable cells), an
implementation check (analytic gradient and information against numerical
derivatives; each method's mean error, model SE and coverage over 200 replicates at
one cell, against its prediction), P3
(multinma accepts arm-specific integration moments) and P4 (unit cost and total).

## 7. Departures from DESIGN.md, made before the run

1. **Estimand.** The design defined truth as $E_T[T\lambda_1]/E_T[T\lambda_0]$, an
   exposure-weighted rate ratio. With differential follow-up that quantity depends
   on dropout, which differs by arm, so it is not a treatment effect. The estimand
   here is the population-average marginal rate ratio. This does not build the
   assumption under test into the truth: the assumption concerns how the aggregate
   likelihood maps exposure to expected counts, not what is being estimated.
2. **Effect modification** is fixed at $\gamma = 0.2$ rather than being the driver of
   $\mathrm{CV}(\lambda)$, which is set through the prognostic slope instead, so
   dispersion and effect modification are not confounded. The second null control
   needs equal dispersions in both arms and so runs at $\gamma = 0$ as its own arm.
3. **The joint exposure-covariate model** is implemented as the borrowed arm: the
   exposure-covariate slope is estimated in the individual-data study and carried
   to the aggregate study. It works only when the dropout mechanism transports,
   which this DGM makes true.
4. **Package.** The likelihood is fitted by the study's own code rather than
   through multinma or cpaic, for speed. P3 records that multinma's interface
   accepts arm-specific integration moments, which is all the weighted and
   borrowed arms need to be package results.
5. **Integration order** (P1 in the design) is moot: the integral is closed form.
6. **Reported moments are the arm's sample moments**, not the population values
   the design's "moments exact" suggested. A pre-registration check integrating
   over population moments gave every method, including the weighted one, an
   empirical SD above its model SE, because the Poisson arm likelihood then
   ignores the arm's covariate sampling variation. With sample moments the two
   agree (`results/probes.md`).

## 8. Threats

| threat | handling |
|---|---|
| truth built on the assumption under test | population-average estimand, closed form, checked by Monte Carlo |
| requested correlations silently unattainable | solved exactly; unattainable cells listed and dropped before the run |
| identity asserted rather than checked | realized per-replicate identity recorded; registered slope check |
| total exposure varying with the covariance | mean exposure fixed at 1 in every arm |
| sensitivity arm credited with coverage it has by construction | stated in section 4; scored on width |
| borrowed arm favored by a transportable dropout mechanism | stated in section 2 |
