PageSourceSearch

https://dagitty.net/development/js/example-dags.js

js dagitty.net collected 2026-10-02 03:34:27 UTC 9,349 bytes, 383 lines download raw bytes

1/* DAGitty - a browser-based software for causal modelling and analysis
2   Copyright (C) 2010, 2017, 2022 Johannes Textor
3
4   This program is free software; you can redistribute it and/or
5   modify it under the terms of the GNU General Public License
6   as published by the Free Software Foundation; either version 2
7   of the License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13
14   You should have received a copy of the GNU General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. */
17
18
19// if the module has no dependencies, the above pattern can be simplified to
20(function (root, factory) {
21	if (typeof module === 'object' && module.exports) {
22        // Node. Does not work with strict CommonJS, but
23        // only CommonJS-like environments that support module.exports,
24        // like Node.
25        module.exports = factory();
26    } else {
27        // Browser globals (root is window)
28        root.examples = factory();
29  }
30}(typeof self !== 'undefined' ? self : this, function () {
31	return [ 
32{
33	d : `bb="-3,-0.5,2,1.2"
34	D [outcome,pos="1,1"]
35	E [exposure,pos="-2,1"]
36	Z [pos="-0.5,0.5"]
37	D <-> Z [pos="1,-1"]
38	E -> D
39	E <-> Z [pos="-2,-1"]`,
40
41	l: "The M-bias graph"
42},
43
44{
45	d: `A [pos="-2.200,-1.520"]
46	B [pos="1.400,-1.460"]
47	D [outcome,pos="1.400,1.621"]
48	E [exposure,pos="-2.200,1.597"]
49	Z [pos="-0.300,-0.082"]
50	A -> { E Z }
51	B -> { D Z }
52	E -> D
53	Z -> { D E }`,
54    l: "Extended confounding triangle"
55},
56
57{
58   e: "Z X I\nX I Y\nI Y",
59   v: "X E @-1.193,1.639\n"+
60"Y O @1.053,1.639\n"+
61"Z 1 @-0.132,-0.374\n"+
62"I 1 @0.423,0.755",
63   l: "Small model with mediator"
64},
65
66{
67  v : "E E @-3.728,5.092\n"+
68"D O @-1.510,6.789\n"+
69"1 1 @-5.600,2.115\n"+
70"2 1 @-7.120,-0.603\n"+
71"3 1 @-7.138,-3.731\n"+
72"4 1 @-5.395,-6.348\n"+
73"5 1 @-2.468,-6.074\n"+
74"6 1 @-2.179,-2.682\n"+
75"7 1 @-1.049,-0.238\n"+
76"8 1 @1.043,0.916\n"+
77"9 1 @2.654,-2.614\n"+
78"10 1 @4.955,-4.447\n"+
79"11 1 @7.152,-1.901\n"+
80"12 1 @7.424,1.256\n"+
81"13 1 @5.971,3.498\n"+
82"14 1 @4.225,5.936\n"+
83"15 1 @1.634,7.468",
84  e : "1 E\n"+
85"2 1\n"+
86"3 2\n"+
87"4 3\n"+
88"5 4\n"+
89"6 5\n"+
90"7 6 E\n"+
91"8 7 D\n"+
92"9 8\n"+
93"10 9\n"+
94"11 10\n"+
95"12 11\n"+
96"13 12\n"+
97"14 13\n"+
98"15 14 D\n"+
99"D\n"+
100"E D",
101l: "Many variables but few paths"
102},
103
104 {
105   v : "EDN1.3 E @-2.643,16.642\n"+
106"EDNI1.7 O @-1.234,18.664\n"+
107"SELP.22 1 @-0.481,2.644\n"+
108"SELP.17 1 @-1.367,3.939\n"+
109"ECE1.13 1 @-0.280,7.260\n"+
110"ECE1.12 1 @1.202,8.772\n"+
111"MET.6 1 @3.562,11.155\n"+
112"CAT 1 @4.501,12.816\n"+
113"CSF2.3 1 @2.509,-8.195\n"+
114"CSF2.4 1 @-1.283,-8.195\n"+
115"TGFBR3.10 1 @2.902,-3.702\n"+
116"TGFBR3.2 1 @1.355,-2.058\n"+
117"TGFBR3.8 1 @-0.092,-5.524\n"+
118"SELP.12 1 @3.144,5.234\n"+
119"BMP6.13 1 @-3.207,-4.786\n"+
120"BMP6.12 1 @-2.382,-7.072\n"+
121"ANXA2.8 1 @3.987,20.108\n"+
122"BMP6.11 1 @-1.179,-0.789\n"+
123"ADCY9.8 1 @2.198,9.855\n"+
124"BMP6.10 1 @-3.086,2.250\n"+
125"BMP6 1 @-1.985,4.558\n"+
126"ANXA2.11 1 @0.105,12.599\n"+
127"ANXA2.13 1 @1.437,15.415\n"+
128"MET.5 1 @4.320,3.489\n"+
129"BMP6.9 1 @-2.416,-2.349\n"+
130"ANXA2.7 1 @-1.418,9.206\n"+
131"BMP6.14 1 @-4.254,-6.607\n"+
132"TGFBR3.7 1 @4.445,-7.336\n"+
133"ANXA2.12 1 @-1.329,13.465\n"+
134"SELP.14 1 @3.655,-1.126\n"+
135"Stroke 1 @1.418,3.285\n"+
136"ANXA2.5 1 @-3.410,11.227\n"+
137"TGFBR3.9 1 @1.494,-6.462\n"+
138"EDNI1.6 1 @1.697,21.769\n"+
139"EDN1.9 1 @-4.064,21.051\n"+
140"EDN1.10 1 @-0.282,22.274", 
141
142e : "SELP.22\n"+
143"SELP.17 SELP.22\n"+
144"ECE1.13 SELP.17\n"+
145"ECE1.12 ECE1.13\n"+
146"MET.6 SELP.12\n"+
147"CAT MET.5\n"+
148"CSF2.3 CSF2.4\n"+
149"CSF2.4\n"+
150"TGFBR3.10 TGFBR3.2 TGFBR3.9\n"+
151"TGFBR3.2 TGFBR3.9\n"+
152"TGFBR3.8 TGFBR3.2 TGFBR3.9\n"+
153"SELP.12\n"+
154"EDN1.3 ANXA2.12 EDNI1.7\n"+
155"BMP6.13 BMP6.12 BMP6.9\n"+
156"BMP6.12\n"+
157"EDN1.10 EDNI1.7\n"+
158"EDNI1.6 EDN1.10 EDNI1.7\n"+
159"EDNI1.7\n"+
160"ANXA2.8 EDN1.3 CAT ECE1.12 EDNI1.6 ADCY9.8 BMP6 ANXA2.13\n"+
161"BMP6.11 BMP6.9\n"+
162"ADCY9.8\n"+
163"BMP6.10 BMP6.11 BMP6.13\n"+
164"BMP6 BMP6.10\n"+
165"ANXA2.11\n"+
166"ANXA2.13 ANXA2.11\n"+
167"MET.5 MET.6 TGFBR3.7 SELP.14\n"+
168"BMP6.9\n"+
169"EDN1.9 EDN1.10 BMP6.14 EDN1.3\n"+
170"ANXA2.7 ANXA2.11 ANXA2.5\n"+
171"BMP6.14 BMP6.12\n"+
172"TGFBR3.7 CSF2.3 TGFBR3.10\n"+
173"ANXA2.12 ANXA2.13 ANXA2.11 ANXA2.7 ANXA2.5\n"+
174"SELP.14\n"+
175"Stroke CSF2.4 TGFBR3.10 MET.6 SELP.12 SELP.22 ECE1.13 ECE1.12 BMP6.12 BMP6.13 BMP6.11 ADCY9.8 BMP6.10 TGFBR3.8 MET.5 SELP.14\n"+
176"TGFBR3.9\n"+
177"ANXA2.5",
178
179l: "Sebastiani et al., 2005"
180
181},
182
183{
184    e: "0  1  0  0  0  0  0  0  0  0  0  0  0  0\n"+
185       "0  0  0  0  0  0  0  0  0  0  0  0  0  0\n"+
186       "1  0  0  0  0  0  0  0  0  0  0  0  0  0\n"+
187       "1  0  0  0  0  0  0  0  0  0  0  0  0  0\n"+
188       "0  1  1  0  0  0  1  0  0  0  0  0  0  1\n"+
189       "0  1  1  0  1  0  1  0  0  0  0  0  0  1\n"+
190       "0  1  0  0  0  0  0  0  0  0  0  0  0  0\n"+
191       "1  1  1  1  1  1  1  0  0  0  1  1  1  1\n"+
192       "1  1  1  1  1  1  1  1  0  0  1  1  1  1\n"+
193       "1  1  1  1  1  1  1  1  0  0  1  1  1  1\n"+
194       "1  1  0  0  1  1  1  0  0  0  0  1  0  1\n"+
195       "1  1  1  0  1  1  1  0  0  0  0  0  1  0\n"+
196       "0  1  1  0  1  1  1  0  0  0  0  0  0  1\n"+
197       "0  1  0  0  0  0  0  0  0  0  0  0  0  0",
198
199    v: "ToothLoss E @-1.677,2.421\n"+
200"Mortality O @1.900,2.360\n"+
201"Periodontitis 1 @-0.335,1.703\n"+
202"Caries 1 @-1.879,-1.875\n"+
203"Diabetes 1 @-0.888,0.322\n"+
204"Obesity 1 @-0.904,-1.340\n"+
205"Hypertension 1 @1.780,-0.157\n"+
206"Psychosocial 1 @-0.088,0.266\n"+
207"Age 1 @-0.039,-1.762\n"+
208"Sex 1 @-0.844,-3.340\n"+
209"Alcohol 1 @0.054,-3.594\n"+
210"Smoking 1 @0.772,0.379\n"+
211"Sport 1 @0.914,-3.396\n"+
212"Lipids 1 @2.026,-1.650",
213
214    l: "Polzer et al., 2012"
215},
216
217{
218   e: "A S PA WC U TT\n"+
219      "S TT T2DM\n"+
220      "WC TT U T2DM\n"+
221      "U TT T2DM\n"+
222      "PA WC T2DM\n",
223   v: "TT E @-0.443,-0.942\n"+
224"T2DM O @1.666,2.693\n"+
225"A 1 @-1.429,-2.311\n"+
226"S 1 @-1.423,2.555\n"+
227"WC 1 @0.829,-0.735\n"+
228"U 1 @-0.459,1.159\n"+
229"PA 1 @1.661,-2.186", 
230   l: "Schipf et al., 2010"
231},
232
233{
234   e: "Coach FitnessLevel TeamMotivation\n"+
235"Genetics FitnessLevel NeuromuscularFatigue ConnectiveTissueDisorder\n"+
236"TeamMotivation PreviousInjury WarmUpExercises\n"+
237"PreGameProprioception WarmUpExercises\n"+
238"ConnectiveTissueDisorder TissueWeakness NeuromuscularFatigue\n"+
239"ContactSport IntraGameProprioception PreviousInjury\n"+
240"TissueWeakness Injury\n"+
241"IntraGameProprioception Injury\n"+
242"FitnessLevel PreGameProprioception NeuromuscularFatigue\n"+
243"NeuromuscularFatigue IntraGameProprioception Injury\n"+
244"WarmUpExercises IntraGameProprioception",
245   v: "WarmUpExercises E @-7,8.650\n"+
246"Injury O @4.969,8.605\n"+
247"Coach 1 @-4.392,-7.906\n"+
248"Genetics 1 @2.022,-7.906\n"+
249"TeamMotivation 1 @-7.175,-0.950\n"+
250"PreGameProprioception 1 @-3.638,-1.235\n"+
251"ConnectiveTissueDisorder 1 @3.494,-5.099\n"+
252"PreviousInjury 1 @-4.293,4.175\n"+
253"ContactSport 1 @-1.157,2.548\n"+
254"TissueWeakness 1 @4.236,1.857\n"+
255"IntraGameProprioception 1 @-1.196,8.487\n"+
256"FitnessLevel 1 @-1.489,-4.530\n"+
257"NeuromuscularFatigue 1 @1.501,-1.235", 
258   l: "Shrier & Platt, 2008"
259},
260
261{
262  v: "x3 E @-7.255,2.657\n"+
263"x15 O @5.872,3.552\n"+
264"x4 1 @-7.549,-5.201\n"+
265"x5 1 @-4.116,-0.611\n"+
266"x6 1 @-4.389,7.029\n"+
267"x7 1 @-1.746,2.484\n"+
268"x8 1 @2.209,6.269\n"+
269"x9 1 @1.392,1.874\n"+
270"x10 1 @3.925,-0.307\n"+
271"x11 1 @-1.569,-4.200\n"+
272"x12 1 @1.903,-4.093\n"+
273"x13 1 @6.728,-4.093\n"+
274"x14 1 @-0.676,9.163\n"+
275"x16 1 @5.343,9.342\n"+
276"x17 1 @7.417,7.412\n"+
277"x18 1 @7.260,0.141\n"+
278"x1 1 @-10.173,-1.479\n"+
279"x2 1 @-9.832,5.930",
280  e: "x4 x5\n"+
281  "x5 x7 x11\n"+
282  "x6 x7 x14\n"+
283  "x7 x9\n"+
284  "x8 x14 x15\n"+
285  "x9 x10\n"+
286  "x10 x12 x15\n"+
287  "x11 x12\n"+
288  "x12 x13\n"+
289  "x13\n"+
290  "x14 x16\n"+
291  "x16 x17\n"+
292  "x17\n"+
293  "x18\n"+
294  "x1 x4 x3\n"+
295  "x2 x3\n"+
296  "x15 x17 x18\n"+
297  "x3 x6 x5",
298  l: "Acid & de Campos, 1996" 
299},
300
301{
302  v:"e0 U @0.108,0.697\n"+
303"e1 U @0.284,0.682\n"+
304"e2 1 @0.456,0.622\n"+
305"e3 U @0.545,0.677\n"+
306"e4 U @0.713,0.756\n"+
307"s1 1 @0.266,0.802\n"+
308"s2 A @0.457,0.811\n"+
309"s3 1 @0.645,0.822\n"+
310"x E @0.084,0.942\n"+
311"y O @0.810,0.947\n"+
312"z 1 @0.357,0.891\n"+
313"z2 1 @0.554,0.908\n"+
314"z3 1 @0.958,0.899",
315
316e:"e0 x\n"+
317"e1 s1\n"+
318"e2 s2 @0.446,0.643 y @0.949,0.690\n"+
319"e3 s3\n"+
320"e4 y\n"+
321"s1 s2 z\n"+
322"s2 s3 z2\n"+
323"s3 y\n"+
324"x y s1\n"+
325"y z3\n",
326
327  l: "Thoemmes, 2013"
328},
329
330{
331	v: "AFF 1 @0.262,0.477\n"+
332	"AIS 1 @0.123,0.736\n"+
333	"ALN 1 @0.438,0.506\n"+
334	"APA 1 @0.376,0.147\n"+
335	"CDR 1 @0.628,0.332\n"+
336	"DET 1 @0.920,0.561\n"+
337	"EGC O @0.916,1.016\n"+
338	"FTW 1 @0.667,0.639\n"+
339	"HOS 1 @0.886,0.727\n"+
340	"PER 1 @0.920,0.382\n"+
341	"SAN 1 @0.031,0.371\n"+
342	"SUS E @0.295,1.003",
343
344	e: 	"AFF ALN APA CDR\n"+
345	"AIS AFF EGC SUS\n"+
346	"ALN APA DET FTW PER SUS\n"+
347	"CDR DET\n"+
348	"EGC HOS\n"+
349	"FTW DET EGC\n"+
350	"SAN ALN AFF AIS APA CDR\n"+
351	"SUS EGC FTW HOS\n"+
352	"PER DET\n",
353
354	l: "van Kampen, 2014"
355},
356
357{
358	"d": `
359dag {
360Age [adjusted,pos="-1.973,-0.123"]
361HRT [exposure,pos="-0.536,-0.016"]
362Occ [pos="-1.645,0.432"]
363S [selected,pos="0.925,-0.500"]
364Smo [adjusted,pos="-0.879,0.441"]
365TCI [outcome,pos="0.488,0.090"]
366Thist [pos="-0.569,1.027"]
367Age -> HRT
368Age -> Occ
369Age -> S [pos="-0.945,-0.571"]
370Age -> TCI [pos="-0.264,-0.456"]
371HRT -> TCI
372Occ -> Smo
373Occ -> Thist
374Smo -> HRT
375Smo -> TCI
376TCI -> S
377Thist -> TCI
378}`,
379	l: "Didelez et al, 2010"
380	}
381]; 
382
383}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.