# Model Schematic {#sec:modelschematic} We provide schematics for different parts of the model outlined [here](model-description.html). These are useful because they clarify how different model objects, including data and parameters, are related to one another. Figure \@ref(fig:schem-obs) illustrates a complete observational model, and in particular details the model for multipliers $\alpha_t$. Figure \@ref(fig:schem-inf) presents the basic infection model, and also shows the GLM-style model for reproduction numbers $R_t$. Finally Figure \@ref(fig:schem-latent) shows treating latent infections as parameters. All mathematical notation shown in the figures corresponds to that used in the model description article. Each node is outlined in a color corresponding to the type of object considered. These are interpreted as follows. - **Grey**: A user provided object or quantity that is assumed to be known. - **Green**: A model parameter that is, generally speaking, directly sampled. Occasionally **epidemia** will sample a transformation of this parameter for efficiency purposes. - **Red**: A transformed parameter. This is a quantity that is a deterministic function of other model parameters. - **Orange**: A quantity that is either a parameter or transformed parameter, depending on the context. - **Blue**: An observation. # Observational Model
```{tikz schem-obs, fig.cap = "A schematic for observational models. Only one observational model is shown here, however the figure makes clear that additional models may be included. The model for the multiplier $\\alpha_t$ is shown in the shaded green region. This is very similar in form to the transmission model shown in Figure \\@ref(fig:schem-inf). Infections shown at the bottom may be directly from either the basic infection model, or from an extended model (as described in the model description).", fig.ext = 'png', echo = FALSE, fig.align="center", out.width = "60%"} \usetikzlibrary{shapes,arrows} \definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66} \definecolor{amaranth}{rgb}{0.9, 0.17, 0.31} \definecolor{ao(english)}{rgb}{0.0, 0.5, 0.0} \definecolor{aquamarine}{rgb}{0.5, 1.0, 0.83} \definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96} \definecolor{arsenic}{rgb}{0.23, 0.27, 0.29} \definecolor{amber}{rgb}{1.0, 0.49, 0.0} \tikzstyle{tparam} = [rectangle, draw = amaranth, line width = 0.5mm, minimum size = 20pt, inner sep=5pt, align = center, rounded corners=.2cm, minimum width=2.4cm, fill=white] \tikzstyle{dummy} = [minimum size = 20pt, minimum height=30pt, minimum width=2.4cm] \tikzstyle{param} = [tparam, draw = ao(english)] \tikzstyle{quant} = [tparam, draw = gray, fill = gray!20] \tikzstyle{obs} = [tparam, draw = airforceblue] \tikzstyle{line} = [draw, -latex', ultra thick, color=gray!80] \begin{tikzpicture} \foreach \x in {0,...,5} \foreach \y in {0,...,9} { \node[dummy] (\x\y) at (1.8*\x,1.8*\y) {}; } \node[ minimum height = 16.4cm, minimum width=6.8cm, fill = anti-flashwhite!50] at (1.8, 8.8) (obsmodel1) {}; \node[above of = obsmodel1, node distance=8.4cm, minimum width = 6.8cm, minimum height = 0.6cm, fill=arsenic, text=white] (obs1lab) {First Observation Model}; \node[rectangle, rounded corners=0.2cm, minimum height = 9cm, minimum width = 6.4cm, fill=aquamarine!50] (multmodel) at (1.8,5.25) {}; \node[] (multmodel) at (3.4,10) {\textbf{Multiplier Model}}; \node[tparam, draw=amber] (infections) at (30) {Infections \\ $\{i_s, s ```{tikz schem-latent, fig.cap = "Shows schematic for adding variation to the infection process.", fig.ext = 'png', echo = FALSE, fig.align="center", out.width = "40%"} \usetikzlibrary{shapes,arrows} \definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66} \definecolor{amaranth}{rgb}{0.9, 0.17, 0.31} \definecolor{ao(english)}{rgb}{0.0, 0.5, 0.0} \definecolor{aquamarine}{rgb}{0.5, 1.0, 0.83} \definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96} \definecolor{arsenic}{rgb}{0.23, 0.27, 0.29} \definecolor{amber}{rgb}{1.0, 0.49, 0.0} \tikzstyle{tparam} = [rectangle, draw = amaranth, line width = 0.5mm, minimum size = 20pt, inner sep=5pt, align = center, rounded corners=.2cm, minimum width=2.4cm, fill=white] \tikzstyle{dummy} = [minimum size = 20pt, minimum height=30pt, minimum width=2.4cm] \tikzstyle{param} = [tparam, draw = ao(english)] \tikzstyle{quant} = [tparam, draw = gray, fill = gray!20] \tikzstyle{obs} = [tparam, draw = airforceblue] \tikzstyle{line} = [draw, -latex', ultra thick, color=gray!80] \begin{tikzpicture} \foreach \x in {0,...,2} \foreach \y in {0,...,2} { \node[dummy] (\x\y) at (1.8*\x,1.8*\y) {}; } \node[tparam] (inf) at (10) {Infections \\ $i_t$}; \node[param] (cov) at (01) {CoV \\ $d$}; \node[quant] (dist) at (21) {Distribution \\ $p(\cdot; d)$}; \node[param] (infparam) at (12) {Infections \\ $i_t$}; \path[line,-] (cov.east) to[bend right=45] (11.north); \path[line,-] (dist.west) to[bend left=45] (11.north); \path[line] (inf.north) to (infparam.south); \end{tikzpicture} ```


ImperialCollegeLondon/epidemia documentation built on June 26, 2021, 7:40 a.m.