Skip to content

[feedback][clinical-trial-ipd-sim]Visit timing has zero natural variation #183

Description

@lengning

What an independent reviewer sees: Every single visit record lands on the exact nominal protocol day (e.g., Day 29, 57, 85...) with literally zero variance across subjects. SD of actual-minus-nominal day = 0.0 at every time point.

Why it matters: This is the single most obvious synthetic-data fingerprint. Real trials have ±3–7 day scheduling jitter due to patient availability, clinic hours, holidays, and travel. Without this, any method depending on visit-window assignment (LOCF, MMRM windowing, exposure calculations) cannot be realistically tested.

Where in the spec to fix: The forward simulation loop (Step 5) processes visits at exact nominal days. The spec should mandate a jitter step in dag_state.R or equivalent:

actual_day <- nominal_day + round(rnorm(1, mean = 0, sd = visit_jitter_sd))
actual_day <- clamp(actual_day, window_lower, window_upper)

Suggested spec addition (Step 5 or dag_state.R contract):

"All assessment dates must include per-subject, per-visit scheduling jitter (default SD = 3 days) constrained within the protocol visit window. This applies to labs, vitals, efficacy assessments, and PRO collection independently."

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions