-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneral_conceptual_model3.Rnw
373 lines (325 loc) · 12.6 KB
/
general_conceptual_model3.Rnw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{fontspec}
\usetikzlibrary{decorations.text,pgfplots.groupplots,intersections,shapes.multipart}
\pgfplotsset{compat=1.7}
\definecolor{nice_blue}{HTML}{377EB8}
\definecolor{nice_green}{HTML}{4DAF4A}
\definecolor{nice_purple}{HTML}{984EA3}
\definecolor{nice_red}{HTML}{E41A1C}
\definecolor{nice_orange}{HTML}{FF7F00}
\pgfplotsset{
simple graphs/.style={
domain=0:12
,xmin=0
,xmax=12
,ymin=0
,ymax=12
,axis lines*=left
,xtick=\empty
,ytick=\empty
,every axis y label/.style={
at={(axis description cs:0.09,.5)}
,rotate=90
,anchor=south},
}
,every axis x label/.style={
at={(axis description cs:0.5,-0.1)}
,anchor=south}
}
% \makeatletter
% \tikzset{arc style/.initial={}}
% \pgfdeclareshape{three part circle}{
% %\nodeparts{text,br,bl}
%
% \inheritsavedanchors[from=circle]
% \inheritanchorborder[from=circle]
%
% \inheritanchor[from=circle]{center}
% \inheritanchor[from=circle]{south}
% \inheritanchor[from=circle]{west}
% \inheritanchor[from=circle]{north}
% \inheritanchor[from=circle]{east}
% % etc.
%
% \inheritbackgroundpath[from=circle]
%
%
%
% \beforebackgroundpath{
% % get and set options
% \pgfkeys{/tikz/arc style/.get=\tmp}
% \expandafter\tikzset\expandafter{\tmp}
% \tikz@options
%
% % get radius length and center coordinates
% \radius \pgf@xa=\pgf@x
% \centerpoint \pgf@xb=\pgf@x \pgf@yb=\pgf@y
%
% % draw arc starting from north
% \advance\pgf@yb by\pgf@xa
% \pgfpathmoveto{\pgfpoint{\pgf@xb}{\pgf@yb}}
% \pgfpatharc{180}{270}{\pgf@xa}
%
% % draw arc starting from south
% \advance\pgf@yb by -2\pgf@xa
% \pgfpathmoveto{\pgfpoint{\pgf@xb}{\pgf@yb}}
% \pgfpatharc{90}{180}{\pgf@xa}
%
% \pgfusepath{draw}
% }
% }
% \makeatother
\begin{document}
\begin{tikzpicture}
\def\myshift#1{\raisebox{2ex}}
\centering
%start of mal optimal parenting
\coordinate (a1o1) at (0,0);
%end of mal optimal parenting
\coordinate (a2o1) at (1,0);
%start of mal manual mode
\coordinate (a1m1) at (7.85,-6.7);
%end of mal manual mode
\coordinate (a2m1) at (7.85,-5.7);
%start of normal optimal parenting
\coordinate (n1o1) at (6.85,0);
%start of normal manual mode
\coordinate (n1m1) at (7.85,-1);
%\filldraw[nice_red!70] (a1m1) to [bend left, auto] (a1o1) -- (a2o1) to [bend right, auto] (a2m1);
%\filldraw[nice_purple!70] (a2o1) to [bend right, auto] (a2m1) -- (n1m1) to [bend left, auto] (n1o1);
%start of mal optimal parenting
\coordinate (a1o2) at (0+7.85,0-6.7);
%end of mal optimal parenting
\coordinate (a2o2) at (1+7.85,0-6.7);
%start of mal manual mode
\coordinate (a1m2) at (7.85+7.85,-6.7-6.7);
%end of mal manual mode
\coordinate (a2m2) at (7.85+7.85,-5.7-6.7);
%start of normal optimal parenting
\coordinate (n1o2) at (6.85+7.85,0-6.7);
%start of normal manual mode
\coordinate (n1m2) at (7.85+7.85,-1-6.7);
\node (tl_constrained) at (0,6) [draw,circle,minimum size=6mm,inner sep=0mm] {Hi};
\node (br_constrained) at (2.26667,-6.7*2) [draw,circle,minimum size=6mm,inner sep=0mm] {};
\fill[nice_blue, fill opacity=0.15] (tl_constrained) rectangle (br_constrained);
\node (tl_suboptimal) at (2.26667,6) [draw,circle,minimum size=6mm,inner sep=0mm] {Hi};
\node (br_suboptimal) at (2.26667*2,-6.7*2) [draw,circle,minimum size=6mm,inner sep=0mm] {};
\fill[nice_green, fill opacity=0.15] (tl_suboptimal) rectangle (br_suboptimal);
\node (tl_optimal) at (2.26667*2,6) [draw,circle,minimum size=6mm,inner sep=0mm] {};
\node (br_optimal) at (6.8,-6.7*2) [draw,circle,minimum size=6mm,inner sep=0mm] {};
\fill[nice_red, fill opacity=0.15] (tl_optimal) rectangle (br_optimal);
\node (OPy) at (7.85,-5.7) [draw=none,circle,minimum size=6mm,inner sep=0mm] {};
\node (MMx) at (7.85+1,-6.7) [draw=none,circle,minimum size=6mm,inner sep=0mm] {};
\node (MMy) at (7.85+7.85,-5.7-6.7) [draw=none,circle,minimum size=6mm,inner sep=0mm] {};
\node (OPx) at (1,0) [draw=none,circle,minimum size=6mm,inner sep=0mm] {};
\begin{groupplot}[
group style={
group size=1 by 3,
},
simple graphs,
ytick=\empty,
xtick=\empty,
enlarge x limits=false,
axis lines*=left,
axis line style = {line width=2.83464567*0.5pt,shorten <=-0.5\pgflinewidth}
]
\nextgroupplot[ymax=.6
,xmax=6
,ylabel=\fontspec{Frutiger LT Std 55 Roman} Pr(Manual Mode Tx)
%,xlabel=\fontspec{Frutiger LT Std 55 Roman}Optimal Parenting
]
\addplot[->
,nice_blue
,line width=2.83464567*0.75pt
,samples=1000]
{(1/pi)*(.65/((x-3)^2 + .65^2))};
%{1/(pi*gamma*(1+((x+x0)/gamma)^2)}
%{((5+.25*x)/(.25*x^2+1))};
%{-(.78*x-2.35)^2 + 5.5};
%{\frac{1}{\pi\gamma\,\left[1 + \left(\frac{x-x_0}{\gamma}\right)^2\right]}\}
%\nextgroupplot[hide y axis, hide x axis]
%empty plot spec
%\nextgroupplot[hide y axis, hide x axis]
%empty plot spec
%\nextgroupplot[hide y axis, hide x axis]
%empty plot spec
\nextgroupplot[ymax=6
,xmax=6
,ylabel=\fontspec{Frutiger LT Std 55 Roman}Pr(Non-Maltreative Parenting)
%,xlabel=\fontspec{Frutiger LT Std 55 Roman}Manual Mode Cognition
]
\addplot[->
,nice_blue
,line width=2.83464567*0.75pt]
{.15*x^2};
%\nextgroupplot[hide y axis, hide x axis]
%empty plot spec
%\nextgroupplot[hide y axis, hide x axis]
%empty plot spec
%\nextgroupplot[hide y axis, hide x axis]
%empty plot spec
\nextgroupplot[ymax=6
,xmax=6
,ylabel=\fontspec{Frutiger LT Std 55 Roman}Child Wellbeing
,xlabel=\fontspec{Frutiger LT Std 55 Roman}Resources
]
\addplot[->
,nice_blue
,line width=2.83464567*0.75pt]
{-.15*x^2 + 5.5};
\addplot[nice_green, line width=2.83464567*0.75pt, dashed] plot coordinates {
(0,1)
(6,1)};
\end{groupplot}
% \draw[->
% ,name path = abuse_start
% ,bend left
% ,nice_red
% ,line width=2.83464567*0.5pt
% ,postaction={decorate
% ,decoration={text along path
% ,text align=center
% ,text={|\fontspec{Frutiger LT Std 55 Roman}\myshift|Low Levels of Optimal Parenting}}}
% ] (OPy) to node [auto] {} (OPx);
% \draw[->
% ,name path = abuse_start
% ,bend left
% ,nice_red
% ,line width=2.83464567*0.5pt
% ,postaction={decorate
% ,decoration={text along path
% ,text align=center
% ,text={|\fontspec{Frutiger LT Std 55 Roman}\myshift|Low Levels of Manual Mode Cognitition}}}
% ] (MMy) to node [auto] {} (MMx);
% \node[inner sep=0pt] (vmPFC) at (0,0)
% {\includegraphics[width=.25\textwidth]{N0036253_mod.png}};
% \node[inner sep=0pt] (DLPFC) at (5,-6)
% {\includegraphics[width=.25\textwidth]{N0036254_mod.png}};
%\pgftext{\includegraphics[width=150pt]{N0036253_mod.png}} at (5,5);
%\pgftext{\includegraphics[width=150pt]{N0036254_mod.png}} at (7.85+7.85,-5.7-6.7);
\node (parenting_sit) at (13,6.7+3)
[draw
,circle
,minimum size=4cm
,align=center
,fill=nice_green
,line width=2.83464567pt
,draw=gray!60]
{\fontspec{Frutiger LT Std 55 Roman}Parenting \\
\fontspec{Frutiger LT Std 55 Roman}Situation};
\node[draw
,circle
,minimum width=4cm
,fill=nice_green
,line width=2.83464567pt
,draw=gray!40
] (auto_mode) at (13,3)
{\includegraphics[width=.25\textwidth]{N0036253_mod.png}};
\node[draw=none]
(auto_mode_cover) at (13,1.5) {\fontspec{Frutiger LT Std 55 Roman}Automatic};
\node[draw
,circle
,minimum width=4cm
,fill=white
,line width=2.83464567pt
,draw=gray!40
] (manual_mode) at (7,3)
{\includegraphics[width=.25\textwidth]{N0036254_mod.png}};
\node[draw=none]
(auto_mode_cover) at (7,1.5) {\fontspec{Frutiger LT Std 55 Roman}Manual};
\node[circle split
,draw,
,minimum width=4cm
,append after command={%
\pgfextra{\draw (\tikzlastnode.center) -- (\tikzlastnode.south);
\draw[fill=nice_green
,line width=2.83464567pt
,draw=gray!40
] (\tikzlastnode.west) arc (180:0:2cm) -- cycle;
\draw[fill=nice_green
,line width=2.83464567pt
,draw=gray!40
] (\tikzlastnode.east) arc (0:180:2cm) -- cycle;
\draw[fill=nice_green
,line width=2.83464567pt
,draw=gray!40] (\tikzlastnode.center) -- (\tikzlastnode.west) arc (180:270:2cm) -- cycle;
\draw[fill=white
,line width=2.83464567pt
,draw=gray!40] (\tikzlastnode.center) -- (\tikzlastnode.east) arc (0:-90:2cm) -- cycle;
}
}
] at (13,-3.35) (parenting_beh) {};
\node[yshift=2em, align=center] at (parenting_beh.center)
{\fontspec{Frutiger LT Std 55 Roman}Parenting \\
\fontspec{Frutiger LT Std 55 Roman}Behavior};
\node[xshift=-2.5em,yshift=-2.51em, align=center] at (parenting_beh.center)
{\fontspec{Frutiger LT Std 55 Roman}Optimal};
\node[xshift= 2.5em,yshift=-2em, align=center] at (parenting_beh.center)
{\fontspec{Frutiger LT Std 55 Roman}< \\
\fontspec{Frutiger LT Std 55 Roman}Optimal};
\node[circle split
,draw
,minimum width=4cm,
,append after command={%
\pgfextra{\draw (\tikzlastnode.center) -- (\tikzlastnode.south);
\draw[fill=nice_green
,line width=2.83464567pt
,draw=gray!40
] (\tikzlastnode.west) arc (180:0:2cm) -- cycle;
\draw[fill=nice_green
,line width=2.83464567pt
,draw=gray!40
] (\tikzlastnode.east) arc (0:180:2cm) -- cycle;
\draw[fill=nice_green
,line width=2.83464567pt
,draw=gray!40] (\tikzlastnode.center) -- (\tikzlastnode.west) arc (180:270:2cm) -- cycle;
\draw[fill=white
,line width=2.83464567pt
,draw=gray!40] (\tikzlastnode.center) -- (\tikzlastnode.east) arc (0:-90:2cm) -- cycle;
}
}
] at (13,-3.35-6.7) (child_wb) {};
\node[yshift=2em, align=center] at (child_wb.center)
{\fontspec{Frutiger LT Std 55 Roman}Child \\
\fontspec{Frutiger LT Std 55 Roman}Wellbeing};
\node[xshift=-2.5em,yshift=-1.955em, align=center] at (child_wb.center)
{\textbf{\fontspec{Frutiger LT Std 55 Roman}\char"2265} \\
\fontspec{Frutiger LT Std 55 Roman}Threshold};
\node[xshift= 2.5em,yshift=-2em, align=center] at (child_wb.center)
{\fontspec{Frutiger LT Std 55 Roman} < \\
\fontspec{Frutiger LT Std 55 Roman}Threshold};
% \node (parenting_beh) at (13,-3.35)
% [circle, draw, minimum size=22mm,align=center]
% {\fontspec{Frutiger LT Std 55 Roman}Parenting \\
% \fontspec{Frutiger LT Std 55 Roman}Behaviors \\
% \emph{\fontspec{Frutiger LT Std 55 Roman}Maltreative} \\
% \emph{\fontspec{Frutiger LT Std 55 Roman}or Not}};
% \node (parenting_beh) at (13,-3.35)
% [circle, draw, minimum size=22mm,align=center]
% {\fontspec{Frutiger LT Std 55 Roman}Parenting \\
% \fontspec{Frutiger LT Std 55 Roman}Behaviors};
% \node (child_wb) at (13,-3.35-6.7)
% [draw,circle, minimum size=22mm,align=center]
% {\fontspec{Frutiger LT Std 55 Roman}Child \\
% \fontspec{Frutiger LT Std 55 Roman}Wellbeing};
\draw[->,line width=2.83464567pt]
(parenting_sit) to node [auto] {} (auto_mode);
\draw[->,line width=2.83464567pt]
(auto_mode) to node [auto] {} (parenting_beh);
\draw[->,line width=2.83464567pt, align=center, draw=gray!40, bend right]
(auto_mode) to node [above=40pt, auto]
{\fontspec{Frutiger LT Std 55 Roman}Manual Mode \\
\fontspec{Frutiger LT Std 55 Roman}Transition (Tx)}
(manual_mode);
\draw[->,line width=2.83464567pt, bend right, draw=gray!40]
(manual_mode) to node [auto] {} (parenting_beh);
\draw[->,line width=2.83464567pt]
(parenting_beh) to node [auto] {} (child_wb);
\node (wbar) at (8,1.25-6.7*2) [draw=none,fill=none]
{\fontspec{Frutiger LT Std 55 Roman} State Wellbeing Threshold};
\node (wbar_arrow_end) at (5,.9-6.7*2) [draw=none,fill=none] {};
\draw[->,bend left, line width=2.83464567pt] (wbar) to node [auto] {} (wbar_arrow_end);
\end{tikzpicture}
\end{document}