Closed LittleBeannie closed 18 hours ago
It may be useful to have a vignette to document the randomization ratio workflow in simtrial. I'm happy to send a PR to create a vignette with the following Mermaid JS diagram digitalized from notes above but you'll need to fill out the text.
---
config:
theme: mc
---
flowchart TB
A["Data input"] --> B("Simulated via <code>sim_pw_surv()</code>") & C["Custom input"]
B -- "attr <code>ratio</code>" --> D["<code>wlr.tte_data()</code>"] & E["<code>counting_process()</code>"]
E -- "attr <code>ratio</code>" --> F["<code>wlr.counting_process()</code>"]
C -- "① User-defined<br>② Empirical" --> G["<code>wlr.tte_data()</code>"]
C --> H["<code>counting_process()</code>"]
H --> I["<code>wlr.counting_process()</code>"]
H -.-> J["Empirical ratio calculation"]
J --> K["User-provided ratio"] & L["No user-provided ratio"]
K --> M["Use user's ratio"]
L --> N["Use empirical ratio"]
style A stroke-width:1px,stroke-dasharray: 0
style H stroke-width:1px,stroke-dasharray: 1