From a Follow-Up Schedule to a Graph
A study timeline tells us when variables are measured or interventions are delivered. A longitudinal directed acyclic graph (DAG) makes a different claim: its nodes represent variables at particular occasions, and its arrows represent proposed direct causal relationships. Drawing a graph from a schedule therefore requires two steps: first place every node in its temporal position, then add only arrows justified by the study protocol and causal assumptions. The schedule constrains the drawing, but does not determine it.
The earlier material on time-indexed nodes and temporal ordering established the basic convention of using distinct nodes for measurements at distinct times. Here the focus is the practical translation from a schedule to those nodes and their arrows. In particular, measurements recorded during one visit are not automatically simultaneous in the causal process, and their order cannot be inferred just from their shared visit label.
Write \(X_{t,j}\) for variable \(j\) measured at occasion \(t\), when the identity of the variable and its time need to be explicit. A node is the variable at that occasion, not the whole visit. For example, a visit at which a symptom score is collected and a treatment is then administered contains two nodes, not one generic “visit 1” node. If a variable is recorded more than once, each occasion gets its own node.
Read the Schedule at the Level of Events
Before drawing arrows, extract the event order from the protocol. Record when each measurement is taken, when an intervention is delivered, and whether the protocol or scientific knowledge gives a reliable ordering among events within the same visit. The relevant order is the order of the underlying events, not necessarily the order in which fields appear in a database.
Give each variable-at-time its own node. Use the protocol’s time labels consistently, such as baseline, visit 1, and visit 2.
If a measurement is taken before an intervention at a visit, record that ordering. If two measurements are simultaneous or their order is unknown, keep them tied rather than inventing a sequence.
A prior node can be a cause of a later node, but temporal precedence alone is not sufficient reason to draw an arrow. Include an arrow only when the causal model supports it.
Look for arrows that point into the past, unsupported ordering within a visit, cycles, and nodes that hide distinct measurement events.
When there is a known order within a visit, represent it explicitly. If a baseline blood sample is taken before a dose is administered at the same visit, the sample node can precede the dose node. If the schedule merely says that the sample and dose occurred “at visit 1,” it does not establish their order. A documented time stamp, protocol sequence, or well-supported scientific mechanism may resolve the order. A convenient column order in a data file does not.
Two Checks for a Valid Timeline-Based DAG
Proof. Assign each node the ordered pair \(q(v)=(\tau(v),r(v))\), compared lexicographically: first compare visit times, and, when they are equal, compare within-visit ranks. By the condition in the theorem, every arrow \(u\to v\) satisfies \(q(u)<q(v)\). If there were a directed cycle \(v_1\to v_2\to\cdots\to v_k\to v_1\), the arrows would imply \(q(v_1)<q(v_2)<\cdots<q(v_k)<q(v_1)\). Strict order cannot return to its starting value. Thus no directed cycle exists. \(\square\)
This is a useful construction check, not a guarantee that the causal claims are correct. If two nodes share a visit time and the protocol gives no within-visit order, a chronology-only graph cannot use their visit label to rank them. It is better to record the tie and leave the within-visit direction unresolved than to impose a rank merely to make the diagram tidy.
This limitation can be shown directly. Suppose \(X\) and \(Z\) are recorded at the same visit and the schedule does not order them. The graph with no arrow between them is compatible with that schedule. So is \(X\to Z\), if the causal model supports that direction, and so is \(Z\to X\), if the causal model supports the reverse direction. Each graph can be acyclic. The schedule alone therefore cannot identify either the presence or direction of a within-visit arrow. Likewise, for variables at different visits, an earlier measurement may cause a later one, but the empty graph also respects their temporal order. Arrows require assumptions beyond the schedule.
Worked Constructions
Worked Example: A Measurement Before Treatment at the Same Visit
A protocol collects baseline characteristics \(B\). At visit 1, it measures a clinical marker \(L_1\) and then administers treatment \(A_1\). At visit 2, it measures outcome \(Y_2\). For this example, suppose the proposed causal model includes the arrows \(B\to L_1\), \(B\to A_1\), \(L_1\to A_1\), \(L_1\to Y_2\), and \(A_1\to Y_2\). Draw the graph while respecting the protocol.
The schedule gives the order \(B\), then \(L_1\), then \(A_1\), then \(Y_2\). The visit-1 measurements are separate nodes because the marker is measured before the treatment is administered. The proposed arrow \(L_1\to A_1\) agrees with that within-visit order. The arrows from \(B\) to the later nodes and from the visit-1 nodes to \(Y_2\) also point forward in time.
A compact edge list is \(B\to L_1\), \(B\to A_1\), \(L_1\to A_1\), \(L_1\to Y_2\), and \(A_1\to Y_2\). The rank sequence \(B<L_1<A_1<Y_2\) increases along every edge, so the graph is acyclic. This verifies temporal consistency; the schedule itself does not verify the causal claims.
Worked Example: Two Variables Recorded at the Same Visit
At baseline, a study records age \(C\). At visit 1, it records a symptom score \(S_1\) and a laboratory marker \(M_1\), but the protocol does not specify which is measured first. At visit 2, it records outcome \(Y_2\). The proposed model includes \(C\to S_1\), \(C\to M_1\), \(S_1\to Y_2\), and \(M_1\to Y_2\). Should the graph include an arrow between \(S_1\) and \(M_1\)?
No arrow between \(S_1\) and \(M_1\) follows from the stated information. They occupy the same visit, but no within-visit order or causal relationship between them has been specified. Keep both nodes at visit 1, with the arrows from \(C\) entering them and the arrows to \(Y_2\) leaving them. The edge list is \(C\to S_1\), \(C\to M_1\), \(S_1\to Y_2\), and \(M_1\to Y_2\).
The resulting graph respects the known order: baseline precedes visit 1, which precedes visit 2. Adding \(S_1\to M_1\) or \(M_1\to S_1\) would require additional causal and temporal justification. Drawing both arrows would create a directed cycle, and so could not be part of a DAG.
Worked Example: Separating Events Within a Visit
A visit has the following protocol: first, the investigator records a pre-dose measure \(P_1\); next, treatment \(A_1\) is administered; later that day, a post-dose measure \(Q_1\) is recorded. At the next visit, outcome \(Y_2\) is measured. Suppose the causal model proposes \(P_1\to A_1\), \(A_1\to Q_1\), \(P_1\to Q_1\), and \(Q_1\to Y_2\). Construct and check the graph.
Although \(P_1\), \(A_1\), and \(Q_1\) share a visit label, the protocol places them in the order \(P_1<A_1<Q_1\). The edge \(P_1\to Q_1\) skips an intermediate event but still points forward in the known order. The full ordering is \(P_1<A_1<Q_1<Y_2\), and every proposed arrow goes from an earlier event to a later one. Thus the graph is acyclic by the theorem.
If the dataset stored all three visit-1 records under one visit-level node, this structure could not be shown: the node would conceal both the pre-dose versus post-dose distinction and the proposed causal relations. The node-level graph retains that information without asserting any additional arrows.
Diagnostics, Alternatives, and Limits
A useful audit compares each arrow against the schedule and the causal rationale separately. Ask whether the arrow points forward according to known event order; whether a shared visit label is hiding an unknown ordering; and whether the arrow has a scientific basis beyond “this happened earlier.” Then trace directed paths: a path that returns to its starting node signals a cycle, often caused by putting multiple events into one time label or adding conflicting within-visit directions.
One common alternative is a visit-level diagram with a single node for everything observed at each visit. It can be a compact summary, but it cannot distinguish variables measured at the same visit, represent their separate relations to other variables, or show a known order within the visit. A node-level timeline diagram is more informative for these purposes. The tradeoff is that it has more nodes and requires more explicit assumptions.
A common mistake is to read a measurement schedule as if it were already a causal graph. For example, recording a marker before an outcome establishes that the marker was observed earlier; it does not establish that the marker caused the outcome. A related mistake is to draw an arrow between same-visit measurements solely because they appear in a particular order in a table. The correction in both cases is to separate the two tasks: use the schedule to determine temporal constraints, and use causal knowledge to propose arrows.
These diagrams are also limited by what the schedule records. A variable may be measured only after an underlying process has begun, and two measures recorded at the same time may have occurred in a meaningful causal order that the protocol fails to capture. Conversely, a fine-grained schedule does not resolve unmeasured causes or make a proposed direct causal relation true. When relevant timing is unknown, mark the uncertainty in the analysis notes and avoid claiming more precision than the protocol provides.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A study measures \(R_1\) and \(T_1\) at visit 1 without recording their order, then measures \(Y_2\) at visit 2. Does the schedule alone justify \(R_1\to T_1\)?
- A protocol records \(X_1\), administers \(A_1\), then measures \(Z_1\), all at visit 1. Which of \(X_1\to A_1\), \(A_1\to Z_1\), and \(Z_1\to X_1\) respect the stated order?
- Why can a visit-level node be inadequate when several variables are measured during each visit?
- Suppose every edge in a proposed graph goes from an earlier event to a later event. What does this establish, and what does it not establish?
- A database lists \(M_1\) before \(N_1\) in its columns, but the protocol gives no event order. Is that enough to rank the nodes or draw \(M_1\to N_1\)?
Solutions. (1) No. The two variables share a visit and no within-visit order or causal relation was specified; the schedule alone cannot justify that arrow. (2) \(X_1\to A_1\) and \(A_1\to Z_1\) respect the stated order; \(Z_1\to X_1\) points backward and does not. (3) One visit-level node hides the distinct variables and prevents the graph from representing their separate relations or any known order among them. (4) It establishes temporal consistency and, under the ordering condition, rules out directed cycles; it does not establish that the arrows are causally correct or that omitted arrows are absent. (5) No. Column order is not event order; a protocol or scientific justification is needed to establish a within-visit ordering or causal arrow.