Tutorials › Multi-Arm Multi-Stage (MAMS) Designs › Constructing Interim Data Snapshots

Simulation and Software · Tutorial 432 of 499

Constructing Interim Data Snapshots

Learn to construct and validate cumulative, stage-specific datasets that contain exactly the information available at each interim analysis.

Intermediate 10 min read

What You'll Learn

  • Define an interim snapshot using a prespecified analysis time and data-availability rule.
  • Distinguish the cumulative participant roster from the analysis set with observed endpoints.
  • Filter records using outcome availability as well as enrollment time.
  • Build cumulative snapshots and stage increments without double-counting participants.
  • Check snapshots for future-data leakage, duplicates, and inconsistent stage membership.
  • Compare snapshot construction strategies and identify when each can fail.

Why Interim Snapshots Need an Explicit Definition

A simulated trial can generate outcomes for every participant before any analysis is run. That convenience creates a subtle risk: if a stage-specific dataset is built from the completed simulation rather than from the information available at the interim time, it can include outcomes that would not yet have been known. The simulated decision then uses future information and does not represent the intended trial.

An interim snapshot is a reproducible representation of the trial data available at one specified analysis time. It is not necessarily just “everyone enrolled by then.” For a fixed-follow-up endpoint, a participant may have enrolled before the interim but still be waiting for follow-up. Conversely, if the analysis plan permits partial follow-up or uses an event-driven endpoint, what counts as available must follow that plan.

Definition: A stage-specific interim snapshot is the set of trial records eligible for a specified interim analysis, selected using the analysis time, the protocol’s analysis-population rules, and the information actually available by the data cutoff. A cumulative snapshot contains eligible records accrued over all stages up to that interim. A stage increment contains records newly eligible since the preceding interim.

Before constructing snapshots, specify the simulated trial’s analysis schedule, the population being analyzed, the endpoint, and the rule for when that endpoint becomes available. Also specify how the simulation represents data cutoffs, withdrawals, and missing outcomes. These are design choices, not details that a filtering operation can decide for you.

Representing What Was Available

A useful simulated record has, at minimum, a unique participant identifier, assigned arm, enrollment or randomization time, endpoint value if observed, and a time at which that endpoint became available to the interim analysis. The availability time is distinct from the event time or the end of follow-up: a value might be observed earlier but not entered and available by the analysis cutoff. In a simulation that assumes immediate reporting, the two times can coincide; that assumption should be explicit.

Let \(t_k\) be the data cutoff for interim \(k\), and let \(A_i\) be the time participant \(i\)'s endpoint is available. For an analysis that requires the endpoint to be observed, define the eligible endpoint set as

$$ D_k=\{i:\ i\text{ meets the analysis-population rule},\ A_i\leq t_k,\ \text{and the endpoint is observed}\}. $$

A roster snapshot may instead include all participants randomized by \(t_k\), including those whose endpoints are not yet available. Keep that roster distinct from \(D_k\). Whether participants with unavailable or missing outcomes enter a particular estimator depends on the analysis plan; they must not be silently treated as observed outcomes.

For a fixed-follow-up endpoint, one common rule is to include only participants whose required follow-up is complete and whose endpoint is available by the cutoff. For an event-driven endpoint, the rule may concern observed events or a prespecified information target. Do not substitute one rule for another just because it is easier to implement. The stage times and information fractions established for the simulation should be translated into a precise data cutoff and eligibility rule.

Worked Example: Selecting a Fixed-Follow-Up Snapshot

Suppose a hypothetical trial has two treatment arms and an interim data cutoff at day 40. The endpoint is a 14-day outcome, and the simulation assumes the endpoint is available exactly 14 days after enrollment. The analysis uses randomized participants with observed outcomes by the cutoff.

ParticipantArmEnrollment dayEndpoint available dayEndpoint
P01A102418
P02B203415
P03A3044Not yet available
P04B3650Not yet available

At day 40, all four participants have been randomized, so the roster snapshot has four records. But only P01 and P02 have endpoint availability days no later than 40. Thus \(D_1=\{\text{P01},\text{P02}\}\), with one observed endpoint in each arm. The endpoint mean in arm A is \(18/1=18\) units, and the endpoint mean in arm B is \(15/1=15\) units.

P03 is not eligible for this endpoint analysis merely because enrollment occurred before day 40: the required follow-up has not finished. Including P03’s simulated eventual outcome would use information unavailable at the interim. P04 is also excluded, for the same reason. Both remain in the roster snapshot, which is useful for tracking trial progress without confusing enrollment with endpoint availability.

Constructing Cumulative Snapshots and Stage Increments

If each interim uses all eligible outcomes available by its cutoff, the snapshots are cumulative. For ordered cutoffs \(t_1\leq t_2\leq \cdots\), and consistent population and availability rules, a participant eligible at an earlier cutoff remains eligible at later cutoffs. Therefore \(D_1\subseteq D_2\subseteq\cdots\). The stage increment after interim \(k-1\) is the set of newly eligible records, \(I_k=D_k\setminus D_{k-1}\). For the first interim, take \(I_1=D_1\).

This set-based construction gives a direct consistency check: \(D_k\) should be the union of the increments through stage \(k\), and the increments should not overlap. The argument is simple. Each record in \(D_k\) is either already in \(D_{k-1}\) or newly enters through \(D_k\setminus D_{k-1}\); by definition it cannot be in both the prior set and the difference. Repeating this partition yields

$$ D_k=I_1\cup I_2\cup\cdots\cup I_k,\qquad I_j\cap I_\ell=\varnothing\quad(j\ne \ell). $$

This identity depends on a stable definition of eligibility and a consistent data history. If the protocol changes the analysis population, or if a previously recorded outcome is corrected, simple nesting may not hold for the stored versions of snapshots. In that case, retain versioned data and document the change rather than forcing the sets to appear nested.

Worked Example: Checking Cumulative Counts Against Stage Increments

In a hypothetical simulation, 12 endpoints are eligible at the first interim. By the second cutoff, 19 endpoints are eligible, including the first 12. By the third cutoff, 25 are eligible, including all 19. The stage increments therefore contain \(12\), \(19-12=7\), and \(25-19=6\) newly eligible records.

The cumulative total at stage three must be \(12+7+6=25\). This agrees with the direct count in \(D_3\). If the stored increments instead contain 12, 8, and 6 records, their sum is 26, so at least one record is duplicated or assigned inconsistently. If they contain 12, 7, and 5 records, the total is 24, so a record is missing from the increments or the cumulative count is wrong.

The count check does not by itself establish that the correct records were selected. Compare participant identifiers as well: every member of \(D_3\) should occur in exactly one of \(I_1,I_2,I_3\), and no identifier outside \(D_3\) should occur in those increments.

A Practical Construction and Its Checks

A reliable workflow starts from an immutable simulated-data table and creates a separate snapshot for each cutoff. First determine the cutoff and eligibility rule from the design. Then select the analysis population, apply the availability rule, and preserve enough identifying information to audit the result. Compute summaries only after the selected records have passed validation.

1
Set the cutoff.
Record the interim’s analysis time and the data-lock convention. Use the same time scale for enrollment, endpoint availability, and the cutoff.
2
Apply eligibility.
Select participants in the prespecified analysis population, then require endpoint availability by the cutoff when the analysis requires an observed endpoint.
3
Preserve and validate records.
Keep unique identifiers and arm labels. Check that no identifier is duplicated, no future-available endpoint is present, and arm counts agree with the selected records.
4
Derive increments and summaries.
Compare each cumulative set with the preceding one to identify new records. Calculate analysis summaries from the validated snapshot, not from the full simulated table.

Several diagnostics are especially useful. Check that every endpoint in an analysis snapshot has availability time no later than its cutoff. Check that each randomized participant has a single stable identifier and arm assignment. Tabulate roster counts and observed-endpoint counts separately, by arm and interim. If a cumulative analysis is intended, verify set nesting and reconcile cumulative counts with increments. Finally, inspect participants near the cutoff: boundary errors often arise from mixing inclusive and exclusive time comparisons, or from using dates with inconsistent time zones or rounding.

A missing endpoint is not the same as an endpoint that is merely unavailable at the cutoff. The first may represent loss to follow-up, a data-generation failure, or a genuinely missing measurement; the second is pending information. Preserve that distinction in the data and apply the intended missing-data or analysis rule. Do not replace either status with an invented numeric value or silently drop it without documenting the rule.

Worked Example: A Late-Reported Outcome

Consider a hypothetical participant randomized on day 8 with a required endpoint follow-up completed on day 22. The outcome is entered into the simulated data system on day 25. An interim data lock occurs on day 23, and the simulation assumes that only entered outcomes are available for analysis.

The participant has completed follow-up by day 23, but the endpoint availability time is day 25. Since \(25>23\), the participant is not in the interim endpoint set. If the participant had instead been entered on day 22, the record would meet the availability condition and would be included, assuming all other eligibility criteria are satisfied.

This example shows why a single “follow-up complete” indicator may be insufficient when reporting delays are part of the simulation. If reporting delay is intentionally ignored, state the simplifying assumption that availability coincides with follow-up completion. Otherwise, use the time the data become available, not a later-known final value, to construct the snapshot.

Comparing Snapshot Strategies and Their Limits

A cumulative snapshot is appropriate when an interim analysis uses all eligible information accumulated to date. An increment-only dataset is useful for representing new information between analyses, but it is not a substitute for the cumulative analysis set unless the analysis is specifically defined on new records alone. A roster snapshot answers a different operational question: who has entered the trial by the cutoff? It should not be mistaken for the endpoint analysis dataset.

One alternative is to filter the full final dataset separately for each interim. This is concise, but it is safe only if each filter uses the correct historical availability fields and does not use final values to decide interim eligibility. Another alternative is to save a materialized snapshot when each interim is reached. This can aid auditability, but it requires explicit versioning and can become inconsistent if records are later corrected. In either approach, the defining principle is the same: reproduce the information available under the specified data lock.

Snapshots do not determine which treatment arms should continue, what test should be applied, or how a terminal decision is made. They supply the stage-appropriate data for those later operations. They also cannot repair an incorrectly specified accrual process, endpoint model, missingness mechanism, or analysis population. Their value is narrower but essential: they prevent a simulation from giving an interim analysis data it could not yet have used.

Common Mistakes

  • Using enrollment time alone. This includes participants whose required outcomes are still pending. Apply the endpoint-availability rule as well as any enrollment or randomization criterion.
  • Filtering on final outcome status. A final dataset may reveal values that were not available at the interim. Use time-stamped availability and the interim cutoff.
  • Confusing an increment with a cumulative snapshot. New records since the last interim do not include earlier eligible records. Reconstruct the cumulative set when the analysis requires accumulated data.
  • Equating missing with pending. Pending outcomes may become available later; missing outcomes require the prespecified handling rule. Keep the statuses distinct.
  • Checking only record counts. Equal counts can still hide a duplicated participant and a missing participant. Validate identifiers and membership, not just totals.
Key takeaway: Define each interim dataset by a specified cutoff, analysis population, and information-availability rule. Keep roster, observed-endpoint snapshot, and stage increment distinct, then validate membership and timing before calculating any interim statistic.

Check Your Understanding

Answer each question using the definitions and rules above. Full solutions follow.

  1. At an interim cutoff of day 50, a participant was randomized on day 45, and the endpoint is available on day 61. Is the participant in the roster snapshot? Is the participant in an endpoint analysis requiring observed outcomes by the cutoff?
  2. At the second interim, \(D_1\) contains 14 participants and \(D_2\) contains 21, with \(D_1\subseteq D_2\). How many participants should be in \(I_2\)?
  3. Why is a participant with a completed endpoint entered into the simulated system after the data lock potentially excluded from that interim snapshot?
  4. What two checks can detect a duplicated participant in stage increments even if the total increment count seems plausible?
  5. Give one reason cumulative snapshots might fail to be nested, and state a suitable response.

Solutions. 1. The participant is in the roster snapshot if the roster rule is randomization by day 50. The participant is not in the observed-endpoint analysis set because \(61>50\). 2. \(I_2=D_2\setminus D_1\), so it contains \(21-14=7\) participants. 3. The data lock defines what was available to the analysis; completion alone does not mean the result had been reported or entered by that time. 4. Check that each identifier occurs only once across the increments, and compare the union of increment identifiers with the cumulative snapshot’s identifiers. 5. A changed analysis-population rule or a corrected historical record can break nesting. Retain versioned snapshots, document the change, and do not force the sets to appear nested.

Clinical Biostats