Why the Data Representation Matters
Patients in a multimarker study rarely contribute the same number of measurements at the same times. One marker may be collected at scheduled visits, another only when clinically indicated, and some visits may yield a repeated assay or no usable result. The event or censoring time is a separate piece of information: it is not another marker measurement and should not be substituted for one.
A clear representation preserves which patient had which marker measured, the time of each measurement, the recorded value, and the patient’s event or censoring record. It does not require the markers to share a visit grid. This setup is data organization, not yet a model for the marker trajectories or their relationship to survival.
Indices, Times, and Values
The indices answer different questions. \(i\) identifies the patient, \(k\) identifies the marker, and \(j\) identifies a particular recorded measurement of that marker for that patient. The measurement time \(t_{ikj}\) states when that value was obtained. The value \(Y_{ikj}\) is the result, in the units and scale specified for marker \(k\). The patient-level pair \((T_i,\delta_i)\) records follow-up, not a marker result.
All times must use a clearly specified origin and unit, such as days since enrollment. This is important even when each marker has its own visit schedule: times from different markers can be compared only if their origins and units are compatible. Within a patient-marker collection, records may be listed in chronological order for convenience. If two assays occur at the same time, keep both records with distinct indices \(j\); do not collapse them merely because their times agree.
A patient may have \(n_{ik}=0\) for a marker. That means the observation collection for that patient-marker pair is empty; it does not mean the marker value was measured as zero. Likewise, a scheduled visit with no usable result is not an observed value. If the data system records attempted visits or reasons for unavailable results, retain those as separate visit or missingness information rather than fabricating a \(Y_{ikj}\).
Worked Example: Recording Two Irregular Marker Schedules
Suppose patient A is followed from enrollment, measured in months. Marker 1 is measured at months 0, 2, and 5, with values 4.8, 4.2, and 3.9 units. Marker 2 is measured at months 1 and 4, with values 12 and 10 units. The event is observed at month 7.
For marker 1, \(n_{A1}=3\) and the indexed observations are \((1,0,4.8)\), \((2,2,4.2)\), and \((3,5,3.9)\), with each triple understood as \((j,t,Y)\). For marker 2, \(n_{A2}=2\), with \((1,1,12)\) and \((2,4,10)\). The event record is \((T_A,\delta_A)=(7,1)\).
The marker schedules do not coincide: marker 1 has no recorded value at month 1, and marker 2 has no recorded value at months 0, 2, or 5. Those absences do not create zero-valued measurements. The event at month 7 is also not a measurement of either marker.
Long-Form Records and Ragged Panels
A convenient storage format is one row per observed marker measurement. Each row contains a patient identifier, marker identifier, measurement index or visit identifier, measurement time, and marker value. The patient-level event information can be stored in a separate table with one row per patient, or repeated consistently on measurement rows for some software workflows. Keeping a separate patient table avoids treating the same event record as though it were newly observed at every marker measurement.
The observation collections are ragged: their lengths \(n_{ik}\) can differ across patients and markers. A common rectangular array would require every patient-marker combination to have the same number of measurement slots. Such an array can be used internally if empty slots are explicitly marked as unavailable, but it should not be mistaken for a set of observed values. A long table records only actual measurements and naturally allows different visit counts and times.
This row-count identity follows by partitioning the measurement table into patient-marker groups. Group \((i,k)\) contributes exactly \(n_{ik}\) rows by definition; the groups are disjoint because each row has one patient and one marker identifier. Adding the group sizes therefore gives the total number of measurement rows. The same reasoning explains why a repeated identical assay must still have its own row and index: otherwise the group’s stored row count no longer equals its recorded measurement count.
Worked Example: Preserving Repeated Assays
Patient B has two assays of marker 1 at month 2, and both are recorded as 5.1 units. The patient also has one marker 2 measurement at month 3, valued at 8.7 units. The event has not occurred by the final follow-up at month 6, so the patient is right-censored.
For marker 1, \(n_{B1}=2\), and the indexed collection is \(\{(1,2,5.1),(2,2,5.1)\}\). Although the time and value are identical, the index distinguishes the two records. For marker 2, \(n_{B2}=1\), with collection \(\{(1,3,8.7)\}\). The patient-level event record is \((T_B,\delta_B)=(6,0)\).
The expected number of measurement rows is \(n_{B1}+n_{B2}=2+1=3\). Collapsing the duplicate marker 1 pair into one row would leave only two rows and discard an assay record. The censoring indicator is 0 because follow-up ended before an event was observed; it does not mean that the event time is zero or that marker 2 was missing.
Checking the Relationship to Follow-Up
For a conventional panel collected while patients are under observation, each recorded measurement time should be on the study’s time scale and should be consistent with the patient’s follow-up record. If a patient has an observed event at \(T_i\), a measurement recorded after \(T_i\) needs investigation: it might reflect a time-origin error, an event-date error, or a measurement taken under a different follow-up definition. Do not silently move or delete it. A measurement exactly at \(T_i\) may be possible, but its ordering relative to the event must be defined by the study protocol when relevant.
For right-censored patients, \(T_i\) is the end of observed follow-up, not a known event time. A measurement after \(T_i\) is generally inconsistent with that record unless the measurement belongs to a distinct follow-up period or the censoring definition has been recorded incorrectly. These checks concern coherent data capture; they do not by themselves establish a statistical model or a missing-data assumption.
Worked Example: Auditing Times and Row Counts
Consider two patients and two markers. Patient C has marker 1 measured at months 0 and 3, and marker 2 measured at month 2. Patient C experiences the event at month 4. Patient D has marker 1 measured at months 1 and 5, no recorded marker 2 measurement, and is censored at month 6. All times are months since enrollment.
The measurement row count should be \(2+1+2+0=5\). Patient C’s three measurement times, 0, 3, and 2, are all no later than \(T_C=4\), and the event indicator is \(\delta_C=1\). Patient D’s two measurement times, 1 and 5, are no later than \(T_D=6\), and \(\delta_D=0\). The event table has two records, \((4,1)\) and \((6,0)\), one per patient.
If a file instead contains six measurement rows, compare its patient-marker group counts with the specified counts; a duplicate may be legitimate, so investigate rather than automatically delete it. If C’s marker 2 time were recorded as month 5, the row-count check could still pass, but the time-versus-event check would flag a discrepancy requiring clarification.
Alternatives, Diagnostics, and Limits
A wide table can be convenient when each patient has a fixed number of planned visits and one value per marker at each visit. For truly unequal schedules, it often needs many columns, ambiguous visit labels, or placeholder cells. Long form is usually clearer because each record explicitly identifies its marker and time. A separate patient-level event table complements either layout and prevents event follow-up from being confused with measurement records.
A shared visit index is another possible representation, but it is safe only when its meaning is explicit. “Visit 2” can mean the second visit for a patient, while the calendar time of that visit differs across patients; it does not automatically mean a common elapsed time. If two markers were measured at different times, assigning both to a single nominal visit time hides their actual timing. Preserve the observed times, even when a planned-visit label is also retained.
Before analysis, check patient and marker identifiers, units, time origins, duplicate records, event indicators, and the counts \(n_{ik}\). Confirm that each event record appears once per patient, each observed assay has one row, and any absent values are represented as unavailable rather than as numerical zeros. Review measurements beyond follow-up and ties at the event time against the protocol. These checks can reveal transcription and structure errors, but they cannot determine why a measurement is absent or whether the observation process is ignorable.
This representation does not specify a trajectory model, covariance structure, or association between markers and the event process. Those are modeling choices that require additional assumptions. Its purpose is narrower but essential: to ensure that subsequent methods receive the actual observed values, their actual times, and a correctly coded event or censoring record.
Common Mistakes
- Forcing every marker onto one visit grid. This can imply measurements at times that were never observed. Store the actual \(t_{ikj}\) for each marker record.
- Using the event time as a marker time. \(T_i\) describes follow-up; it is not a value or measurement time unless an assay was separately recorded then.
- Dropping repeated identical measurements. Two assays with the same time and value remain two indexed records if both were recorded.
- Encoding an unmeasured marker as zero. Zero is a measured value when recorded as such; absence is not a numeric result.
- Interpreting censoring as an observed event. With the stated convention, \(\delta_i=0\) means follow-up ended at \(T_i\) without observing the event by then.
Check Your Understanding
Answer each question, then compare with the solutions below.
- Patient E has three marker 1 records, two at the same time with the same value. What should \(n_{E1}\) be, and should those two records be collapsed?
- A patient’s event record is \((9,0)\). Interpret it, and explain whether month 9 is automatically a marker measurement time.
- There are two patients and two markers, with counts \(n_{11}=2\), \(n_{12}=0\), \(n_{21}=1\), and \(n_{22}=3\). How many measurement rows should the long table contain?
- One marker value is recorded at month 6, but the patient’s event was observed at month 5. Name two possible explanations and state the appropriate data-handling response.
Solutions. (1) \(n_{E1}=3\). Keep all three indexed records; identical time-value pairs can still represent distinct assays. (2) Follow-up ended at month 9 without an observed event by that time, so the record indicates right censoring. Month 9 is not automatically a marker measurement time; it is one only if a measurement was actually recorded then. (3) The expected row count is \(2+0+1+3=6\). (4) Possible explanations include an inconsistent time origin or an incorrect event or measurement date; the measurement may also belong to a separately defined follow-up period. Check the source records and protocol, clarify the time definitions, and correct only with documented justification rather than silently deleting or shifting the value.