Tutorials › Pattern-Mixture and Selection Models › Representing Longitudinal Observation And Dropout Indicators

Mechanisms and Ignorability in Longitudinal Studies · Tutorial 1 of 499

Representing Longitudinal Observation And Dropout Indicators

Learn to construct visit-level observation indicators and histories, and use them to represent which repeated outcomes are recorded without confusing missingness with an outcome value.

Intermediate 10 min read

What You'll Learn

  • Define a binary observation indicator for each participant and scheduled visit.
  • Distinguish a full outcome trajectory from the outcomes actually recorded.
  • Build and interpret visit-specific indicator histories.
  • Encode records with missed visits, returning participants, and follow-up that ends.
  • Recognize information lost by counts or complete-case indicators alone.
  • Check indicator records for coding and interpretation errors.

Why Represent Observation Visit by Visit?

In a repeated-measures study, “the participant is missing” is often too blunt a description. A participant might miss one assessment and return at the next, or have outcomes recorded for several visits before follow-up ends. Those situations produce different observed records. Representing observation separately at each scheduled visit makes that structure explicit, without yet making any claim about why an outcome is unavailable.

The representation begins with two distinct objects: the outcome that is defined for a participant at a visit, and an indicator stating whether that outcome was observed. Keeping them separate is essential. An unobserved outcome is not a zero, and an indicator of observation is not itself an outcome measurement.

Definition: Suppose a study has \(n\) participants and \(J\) scheduled visits. Let \(Y_{ij}\) denote the outcome for participant \(i\) at visit \(j\), for \(i=1,\ldots,n\) and \(j=1,\ldots,J\). Let the visit-specific observation indicator be $$ R_{ij} = \begin{cases} 1, & \text{if the outcome } Y_{ij} \text{ is observed at visit } j,\\ 0, & \text{if the outcome } Y_{ij} \text{ is not observed at visit } j. \end{cases} $$ The full indicator vector for participant \(i\) is \(R_i=(R_{i1},\ldots,R_{iJ})\). The full outcome vector \(Y_i=(Y_{i1},\ldots,Y_{iJ})\) refers to outcomes across all scheduled visits; some of its entries may be unavailable in the observed data.

This notation assumes a specified set of visits and a defined outcome for each participant at each of those visits, whether or not it is recorded. In practice, the study must also specify what counts as an outcome observed “at” a visit—for example, the assessment window or acceptable measurement source. An indicator should follow that operational rule consistently. If a value is not recorded under the rule, \(R_{ij}=0\); the value is not replaced with a numerical placeholder such as zero.

Indicators, Histories, and the Observed Record

For a participant, the vector \(R_i\) records the observation status across the entire schedule. A history through visit \(j\) is the part of that vector up to and including \(j\):

$$ R_{i,1:j}=(R_{i1},R_{i2},\ldots,R_{ij}). $$

The history before visit \(j\) is \(R_{i,1:(j-1)}=(R_{i1},\ldots,R_{i,j-1})\). For the first visit there is no earlier visit history. These are histories of observation status, not outcome histories. The observed outcome history through visit \(j\) consists only of the recorded pairs \((k,Y_{ik})\) for which \(k\leq j\) and \(R_{ik}=1\). A zero in an indicator history identifies an unavailable outcome slot; it does not supply that outcome’s value.

One precise way to describe the observed record is to pair each visit’s indicator with its outcome when available. For each \(j\), write \((R_{ij},Y_{ij})\) if \(R_{ij}=1\), and write \((0,\text{unobserved})\) if \(R_{ij}=0\). Here “unobserved” is a status label, not a value on the outcome scale. The record over all visits then retains both the visit positions and which outcomes are available.

Worked Example: Encoding a Participant’s Visit Record

Suppose four visits are scheduled for a hypothetical participant. The recorded outcomes are 12 at visit 1, no outcome at visit 2, 15 at visit 3, and 14 at visit 4. Encode the observation indicators and histories, and identify the observed outcome history.

Visit by visit, an outcome is recorded at visits 1, 3, and 4, so the indicators are \(R_{i1}=1\), \(R_{i2}=0\), \(R_{i3}=1\), and \(R_{i4}=1\). Therefore, $$ R_i=(1,0,1,1). $$

The histories are \(R_{i,1:1}=(1)\), \(R_{i,1:2}=(1,0)\), \(R_{i,1:3}=(1,0,1)\), and \(R_{i,1:4}=(1,0,1,1)\). The observed outcome history through visit 4 is \(\{(1,12),(3,15),(4,14)\}\). It does not contain an outcome value for visit 2.

There are three observed outcomes, since \(1+0+1+1=3\). The sequence also shows that an unavailable visit was followed by a recorded outcome. It would be incorrect to encode the second outcome as 0: that would assert a measured outcome value rather than indicate that the value is unavailable.

A compact record must preserve the position of each entry. If only the observed outcome values \(12,15,14\) were retained, without visit labels or indicators, one could not tell whether the middle value came from visit 2 or visit 3. Thus observation indicators do more than count available measurements: they locate them on the planned visit schedule.

What Patterns of Indicators Encode

Different sequences of zeros and ones encode different observed follow-up patterns. For example, \((1,1,0,0)\) indicates outcomes recorded at the first two scheduled visits and unavailable at the last two. If study records establish that follow-up ended after visit 2, this sequence represents a pattern of outcomes observed up to that point with no later outcomes recorded. By contrast, \((1,0,1,0)\) records a missed visit followed by a return and then another unavailable outcome. Both sequences contain two ones, but the visits at which outcomes are recorded differ.

A string of zeros after a sequence of ones can encode the observed pattern associated with follow-up ending. However, the indicator sequence by itself records observation status, not the reason for it. It cannot establish whether a participant permanently withdrew, was temporarily unreachable, or had outcomes unavailable for some other reason. That distinction requires study context or additional information; it should not be inferred merely from a zero.

Worked Example: Comparing Two Indicator Histories

Consider two hypothetical participants followed at five visits. Participant A has \(R_A=(1,1,0,0,0)\), and participant B has \(R_B=(1,0,1,0,0)\). Compare their recorded visit counts, their histories, and what can be concluded from the patterns.

For participant A, the number of recorded outcomes is $$ \sum_{j=1}^{5} R_{Aj}=1+1+0+0+0=2. $$ For participant B, it is $$ \sum_{j=1}^{5} R_{Bj}=1+0+1+0+0=2. $$ So both have two recorded outcomes. But A’s recorded visits are 1 and 2, whereas B’s are 1 and 3. Their histories through visit 3 are \(R_{A,1:3}=(1,1,0)\) and \(R_{B,1:3}=(1,0,1)\), which are different.

If the records also confirm that A’s follow-up ended after visit 2, A’s pattern is consistent with outcomes observed up to the end of follow-up. B’s indicator history shows that an outcome was unavailable at visit 2 and recorded at visit 3. The two indicators alone do not establish why visit 2 was missed or why visits 4 and 5 have no recorded outcomes. A count of two observed outcomes would conceal these differences.

The pattern \((1,1,0,0)\) is often described informally as outcomes observed through one point in the schedule and unavailable thereafter. At this stage, the useful object is the full sequence itself. A formal definition of when dropout occurs depends on the study’s visit structure and conventions, so the indicator sequence should not be confused with a separate definition of dropout time.

From Full Outcomes to the Observed Data

The full outcome vector is a conceptual record across scheduled visits; the observed record contains only the entries whose indicators equal one. Formally, the map from the full values and their observation indicators to the observed record is deterministic: at each visit, retain \(Y_{ij}\) when \(R_{ij}=1\), and mark the outcome as unavailable when \(R_{ij}=0\). This map explains exactly what the data record preserves and what it omits.

$$ \text{Observed record for participant }i = \bigl((R_{ij},\,Y_{ij}\text{ if }R_{ij}=1)\bigr)_{j=1}^{J}. $$

The indicator vector does not recover an unobserved outcome. For instance, two possible full outcome vectors \((12,8,15,14)\) and \((12,20,15,14)\), paired with \(R_i=(1,0,1,1)\), produce the same observed record: visits 1, 3, and 4 have values 12, 15, and 14, while visit 2 is unavailable. The observed data alone cannot distinguish the two values at visit 2.

For a simple numerical summary, the number of outcomes recorded for participant \(i\) is \(N_i^{\mathrm{obs}}=\sum_{j=1}^{J}R_{ij}\). Across participants, the total number of observed outcome measurements is \(\sum_{i=1}^{n}\sum_{j=1}^{J}R_{ij}\). These counts are useful checks, but they do not preserve the arrangement of the ones and zeros. They cannot replace the participant-level histories when visit location matters.

Worked Example: Counting Observed Outcomes Without Losing the Patterns

In a hypothetical three-visit study of four participants, suppose the indicator vectors are \(R_1=(1,1,1)\), \(R_2=(1,0,1)\), \(R_3=(1,1,0)\), and \(R_4=(1,0,0)\). Find the observed count for each participant and the total number of recorded outcomes.

The participant-level counts are $$ N_1^{\mathrm{obs}}=1+1+1=3,\quad N_2^{\mathrm{obs}}=1+0+1=2,\quad N_3^{\mathrm{obs}}=1+1+0=2,\quad N_4^{\mathrm{obs}}=1+0+0=1. $$ Adding them gives \(3+2+2+1=8\) recorded outcomes.

The same total can be checked by summing visit indicators: visit 1 has \(1+1+1+1=4\) recorded outcomes, visit 2 has \(1+0+1+0=2\), and visit 3 has \(1+1+0+0=2\). Thus the total is \(4+2+2=8\). These equal totals are a useful consistency check. The count alone does not reveal that participant 2 was observed at visits 1 and 3, while participant 3 was observed at visits 1 and 2.

Practical Checks and Common Pitfalls

A well-formed indicator record should have exactly one binary value for each participant and each scheduled visit. Before interpreting the histories, check that the visit order is consistent, every indicator is either 0 or 1, and every indicator equal to 1 corresponds to an outcome value recorded under the study’s rules. Conversely, an indicator equal to 0 should not be paired with a value that is silently treated as observed. A mismatch between the outcome record and the indicator record is a data-structure problem, not evidence about the unrecorded outcome.

Also check that the visit schedule is clear. If participants have different planned schedules, the same vector position may not refer to the same visit for everyone unless the records explicitly define it that way. Similarly, if measurements outside a target visit window are allowed, the rule for assigning them to a scheduled visit needs to be stated before indicators can be coded consistently.

RepresentationWhat it preservesWhat it can lose
Full indicator vector \(R_i\)Observation status at each scheduled visitOutcome values themselves
Observed outcome values with visit labelsRecorded values and their visit locationsUnobserved outcome values
Count \(N_i^{\mathrm{obs}}\)How many outcomes are recorded for a participantWhich visits were observed
All-visits indicatorWhether every scheduled outcome is recordedPatterns among participants not observed at every visit

A common mistake is to replace the entire history with a count and reason that two participants with the same count have the same missing-data record. That is wrong: \((1,1,0,0)\) and \((1,0,1,0)\) both have two observed outcomes but locate them at different visits. The correction is to retain \(R_i\), or an equivalent visit-labelled record, and use the count only for summaries that genuinely require a count.

Another mistake is to read a zero as an outcome of zero, or to assume that every sequence ending in zeros proves permanent withdrawal. The correction is to interpret \(R_{ij}=0\) only as “the outcome was not observed under the stated recording rule.” A reason or permanence claim requires information beyond that binary indicator. In particular, the indicator representation describes the observed structure; by itself it does not explain the process that produced it.

Key takeaway: Use one binary \(R_{ij}\) for each participant and scheduled visit. The ordered indicator history locates observed and unavailable outcomes, while recorded values remain distinct from missing slots. Counts summarize a history but cannot replace it.

Check Your Understanding

Answer each question using the visit-specific indicator notation. Brief solutions follow the questions.

  1. A participant’s outcomes are observed at visits 1, 2, and 4 of a four-visit study. Write the indicator vector and the history through visit 3.
  2. For \(R_i=(1,0,1,0)\), which outcomes are recorded? Does this sequence establish why the other outcomes are unavailable?
  3. Two participants each have three observed outcomes across five visits. Give two different indicator vectors that demonstrate why their counts need not represent the same observed pattern.
  4. In a three-visit study, four participants have indicators \((1,1,1)\), \((1,0,1)\), \((1,1,0)\), and \((1,0,0)\). What is the total number of observed outcomes?
  5. Why is it incorrect to store an unavailable outcome as the numerical value zero while also using zero to mean \(R_{ij}=0\)?

Solutions. (1) \(R_i=(1,1,0,1)\); the history through visit 3 is \(R_{i,1:3}=(1,1,0)\). (2) Outcomes at visits 1 and 3 are recorded. The indicators show which visits are unavailable, not why. (3) For example, \((1,1,1,0,0)\) and \((1,0,1,0,1)\) both have three ones but represent different recorded visits. (4) The total is \((1+1+1)+(1+0+1)+(1+1+0)+(1+0+0)=3+2+2+1=8\). (5) The numerical value zero is an outcome-scale value, whereas \(R_{ij}=0\) is an observation-status code; conflating them makes an observed zero indistinguishable from an unavailable outcome.

Clinical Biostats