som_to_df function

Converts the Wide/Verbose Output Simulation Functions into Data Frames

Converts the Wide/Verbose Output Simulation Functions into Data Frames

The functions run_simulation_ubiquity, simulate_subjects, or run_simulation_titrate

provide outputs in a more structured format, but it may be useful to convert this "wide" format to a tall/skinny format.

som_to_df(cfg, som)

Arguments

  • cfg: ubiquity system object
  • som: simulation output from run_simulation_ubiquity, simulate_subjects, or run_simulation_titrate

Returns

Data frame of the format:

When applied to the output of run_simulation_ubiquity or run_simulation_titrate

  • ts.time - timescale of the system
  • ts.ts1, ... ts.tsn - timescales defined in the system (<TS>)
  • pred - predicted/simulated response
  • tt.ti1.x - titration event information (*)
  • name - state or output (<O>) name corresponding to the prediction

When applied to the output of simulate_subjects

  • ID - subject ID
  • ts.time - timescale of the system
  • ts.ts1, ... ts.tsn - timescales defined in the system (<TS>)
  • pred - predicted/simulated response
  • tt.ti1.x - titration event information (*)
  • P1, P2, ... Pn - system parameters for the subject (<P>)
  • name - state or output (<O>) name corresponding to the prediction

(* - field present when titration is enabled)

See Also

run_simulation_titrate internally when running simulations.

  • Maintainer: John Harrold
  • License: BSD_2_clause + file LICENSE
  • Last published: 2025-01-07