Baseline model: $$\log E\{Y_{t+1} \mid A_t = 0, I_t = 1\} = \alpha_0 + \alpha_1 \cdot \mathrm{time} / \mathrm{total\_T} + \alpha_2 \cdot \mathbf{1}(\mathrm{time} > \mathrm{total\_T}/2).$$
Treatment effect model: $$\log RR_t = \beta_0 + \beta_1 \cdot \mathrm{time} / \mathrm{total\_T}.$$
Randomization probabilities \(p_t\) cycle over 0.3, 0.5, 0.7 (with repetition). Availability is exogenous at 0.8 for all time points.
data_binaryA data frame with 3000 observations and 10 variables:
Individual id number.
Decision point index.
Time-varying covariate 1, the \"standardized time in study\", defined as the current decision point index divided by the total number of decision points.
Time-varying covariate 2, indicator of \"the second half of the study\", defined as whether the current decision point index is greater than the total number of decision points divided by 2.
Binary proximal outcome.
Treatment assignment: whether the intervention is randomized to be delivered (=1) or not (=0) at the current decision point.
Randomization probability \(P(A=1)\) for the current decision point.
Availability indicator (=1 available, =0 not available) at the current decision point.