Skip to content

Measurements over time

This page only applies to studies with repeated measurements. In a study with baseline variables and an outcome at follow-up, as in the example, place the baseline variables in earlier layers and the outcome in a later layer.

If the same variables were measured at several time points, for example a score at a first, second and third visit, you can list each variable and each time point once, instead of listing every combination.

Data

Use one column per variable and time point, with the time point as a suffix:

AGE SCORE_T0 SCORE_T1 SCORE_T2 OUTCOME
63.2 41.0 43.5 40.2 No

If the time point is a prefix (T0_SCORE), set data: column_pattern: "{time}_{variable}" in settings.yml.

variables.xlsx

Set repeated to yes for the layer:

layer repeated
Background no
Scores yes
Outcome no

List the variable once, without the time point:

variable layer times
AGE Background
SCORE Scores
OUTCOME Outcome

times restricts a variable to specific time points, for example T0; T2. If empty, all time points are used.

Add one row per time point, in chronological order:

time label
T0 First visit
T1 Second visit
T2 Third visit

Expansion into layers

A repeated layer is expanded into one layer per time point, in chronological order:

flowchart LR
    B["Background"] --> S0["Scores<br/>(First visit)"] --> S1["Scores<br/>(Second visit)"] --> S2["Scores<br/>(Third visit)"] --> O["Outcome"]
    style B fill:#e4eef7,stroke:#2166ac,color:#1f2328
    style S0 fill:#eef0f3,stroke:#8e99a6,color:#1f2328
    style S1 fill:#eef0f3,stroke:#8e99a6,color:#1f2328
    style S2 fill:#eef0f3,stroke:#8e99a6,color:#1f2328
    style O fill:#f6e3e5,stroke:#b2182b,color:#1f2328

Several repeated layers must be adjacent on the layers sheet. They are expanded together, with one block per time point. In the figures, each repeated variable has the same position at every time point.

In settings.yml, Scores refers to the layer at all time points, and Scores (Second visit) refers to the layer at one time point.

Interpretation

  • Arcs between the same variable at consecutive time points are usually strong and stable. They reflect persistence and are not a finding in themselves.
  • Arcs that skip a time point indicate that the earlier value is associated with the later value beyond the intermediate value. This can also be caused by measurement error in the intermediate value.
  • The order within a time point is an assumption, as is the order between layers. If the order is unknown, place the variables in the same layer.

Limitations

The network describes the joint distribution of the variables at the time points. It does not model trajectories, change scores, measurement error or latent variables. Missing values at a time point are handled as described in Missing values; the missing setting of a variable applies to all its time points.