transfer from old repo

This commit is contained in:
Andreas Gammelgaard Damsbo 2026-08-19 09:27:27 +02:00
commit 277e2b8cf3
No known key found for this signature in database
1111 changed files with 83736 additions and 0 deletions

View file

@ -0,0 +1,31 @@
## Creating Examples
To create a new example, run ShinyDAG locally using the shinydag dev docker file.
Set up your example and then save it as a bookmark.
Note the URL created by shiny for the bookmark, it should end with
```
?_state_id_=9d49cb0ba72b00f2
```
Navigate to the `shiny_bookmarks` folder and find the folder with the bookmark token, e.g. `9d49cb0ba72b00f2`.
Copy `values.rds` to `www/examples` and give the file a descriptive name.
These names are used for the shiny inputs, so keep the characters sane (and no spaces).
Also, save the DAG image into `www/examples` with the same name (not required but a good idea).
Finally, add the description text to `www/examples/examples.yml`.
Here's an example template that you can copy.
Note that if you can use HTML in the `description`, but it needs to be valid or it will cause problems on the page.
```yaml
- name: Classic Confounding
description: >
This is a description of classic confounding. Descriptions may include
<strong>HTML</strong>.
file: classic-confounding.rds
image: classic-confounding.png
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View file

@ -0,0 +1,23 @@
- name: Classic Confounding
description: >
This depicts <em>classic confounding</em>, where a confounder C is a common cause of exposure (E) and outcome (Y).
file: classic-confounding.rds
image: classic-confounding.png
- name: Differential Loss to Follow-Up
description: >
This depicts <em>differential loss to follow up</em>, where patients may be censored (C) depending on their value of L.
file: differential-loss-to-follow-up.rds
image: differential-loss-to-follow-up.png
- name: Mediator with Confounding
description: >
This shows a <em>mediator with confounding</em>, where the variable M mediates the effect of E on Y, which is confounded by the variable C.
file: mediator-with-confounding.rds
image: mediator-with-confounding.png
- name: Selection Bias
description: >
This depicts classic <em>selection bias</em>, where C denotes criteria under which the data are observed which, in turn, is a downstream consequence of exposure (E) and outcome (D).
file: selection-bias.rds
image: selection-bias.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.