pharmpy.modeling.add_observations#
- pharmpy.modeling.add_observations(td, arm, variable, time_points, start_time=0.0)[source]#
Add observations to an arm in a trial design
- Parameters:
td (TrialDesign) – TrialDesign to add to
arm (str) – Name of the arm
variable (str) – Name of the variable to observe
time_points (Sequence[float]) – List of the time points for the observations
start_time (float) – Set a start_time to offset the time_points. Default 0.0
- Returns:
TrialDesign – An updated TrialDesign
Example
>>> from pharmpy.modeling import create_trial_design, add_arm, add_observations >>> td = create_trial_design() >>> td = add_arm(td, name="Placebo", size=100) >>> td = add_observations(td, arm="Placebo", variable="DV", time_points=[0.0, 1.0, 2.0, 4.0, 16.0]) >>> td ╭────── Observations ──────╮ Placebo │ 0.0, 1.0, 2.0, 4.0, 16.0 │ ╰─────────── DV ───────────╯ ├──────────────────────────┤ 0.0 16.0