├── R ├── vacamole │ ├── vacamole.docx │ ├── vacamole.pdf │ └── vacamole_files │ │ ├── figure-html │ │ ├── unnamed-chunk-8-1.png │ │ └── unnamed-chunk-11-1.png │ │ └── libs │ │ ├── bootstrap │ │ └── bootstrap-icons.woff │ │ └── quarto-html │ │ ├── tippy.css │ │ ├── quarto-syntax-highlighting.css │ │ └── anchor.min.js └── seirv │ └── seirv.qmd ├── pn_compose_sir ├── pn_compose_sir.docx ├── pn_compose_sir.pdf ├── pn_compose_sir_files │ ├── libs │ │ ├── bootstrap │ │ │ └── bootstrap-icons.woff │ │ └── quarto-html │ │ │ ├── tippy.css │ │ │ ├── quarto-syntax-highlighting.css │ │ │ └── anchor.min.js │ ├── figure-html │ │ ├── cell-8-output-1.svg │ │ ├── cell-7-output-1.svg │ │ └── cell-11-output-1.svg │ └── figure-commonmark │ │ ├── cell-8-output-1.svg │ │ ├── cell-7-output-1.svg │ │ └── cell-11-output-1.svg ├── Project.toml ├── pn_compose_sir.qmd └── pn_compose_sir.md ├── pn_compose_sirh ├── pn_compose_sirh.docx ├── pn_compose_sirh.pdf ├── pn_compose_sirh_files │ ├── libs │ │ ├── bootstrap │ │ │ └── bootstrap-icons.woff │ │ └── quarto-html │ │ │ ├── tippy.css │ │ │ ├── quarto-syntax-highlighting.css │ │ │ └── anchor.min.js │ ├── figure-html │ │ ├── cell-9-output-1.svg │ │ ├── cell-7-output-1.svg │ │ └── cell-8-output-1.svg │ └── figure-commonmark │ │ ├── cell-9-output-1.svg │ │ ├── cell-7-output-1.svg │ │ └── cell-8-output-1.svg ├── Project.toml └── pn_compose_sirh.qmd ├── pn_compose_sirv ├── pn_compose_sirv.docx ├── pn_compose_sirv.pdf ├── pn_compose_sirv_files │ ├── figure-html │ │ ├── cell-7-output-1.png │ │ ├── cell-8-output-1.png │ │ ├── cell-11-output-1.png │ │ ├── cell-8-output-1.svg │ │ ├── cell-7-output-1.svg │ │ └── cell-11-output-1.svg │ ├── libs │ │ ├── bootstrap │ │ │ └── bootstrap-icons.woff │ │ └── quarto-html │ │ │ ├── tippy.css │ │ │ ├── quarto-syntax-highlighting.css │ │ │ └── anchor.min.js │ └── figure-commonmark │ │ ├── cell-8-output-1.svg │ │ ├── cell-7-output-1.svg │ │ └── cell-11-output-1.svg ├── Project.toml ├── pn_compose_sirv.qmd └── pn_compose_sirv.md ├── pn_compose_sir_stages ├── pn_compose_sir_stages.pdf ├── pn_compose_sir_stages.docx ├── pn_compose_sir_stages_files │ └── libs │ │ ├── bootstrap │ │ └── bootstrap-icons.woff │ │ └── quarto-html │ │ ├── tippy.css │ │ ├── quarto-syntax-highlighting.css │ │ └── anchor.min.js └── Project.toml ├── pn_stratify_ageclasses ├── pn_stratify_ageclasses.pdf ├── pn_stratify_ageclasses.docx ├── pn_stratify_ageclasses_files │ ├── figure-html │ │ ├── cell-12-output-1.png │ │ ├── cell-13-output-1.png │ │ ├── cell-14-output-1.png │ │ ├── cell-3-output-1.png │ │ ├── cell-4-output-1.png │ │ ├── cell-6-output-1.png │ │ ├── cell-8-output-1.png │ │ ├── cell-9-output-1.png │ │ ├── cell-3-output-1.svg │ │ └── cell-4-output-1.svg │ ├── libs │ │ ├── bootstrap │ │ │ └── bootstrap-icons.woff │ │ └── quarto-html │ │ │ ├── tippy.css │ │ │ ├── quarto-syntax-highlighting.css │ │ │ └── anchor.min.js │ └── figure-commonmark │ │ ├── cell-3-output-1.svg │ │ └── cell-4-output-1.svg └── Project.toml ├── pn_stratify_two_risk_groups ├── pn_stratify_two_risk_groups.pdf ├── pn_stratify_two_risk_groups.docx ├── pn_stratify_two_risk_groups_files │ ├── libs │ │ ├── bootstrap │ │ │ └── bootstrap-icons.woff │ │ └── quarto-html │ │ │ ├── tippy.css │ │ │ ├── quarto-syntax-highlighting.css │ │ │ └── anchor.min.js │ ├── figure-html │ │ ├── cell-3-output-1.svg │ │ └── cell-4-output-1.svg │ └── figure-commonmark │ │ ├── cell-3-output-1.svg │ │ └── cell-4-output-1.svg └── Project.toml ├── .gitignore └── LICENSE /R/vacamole/vacamole.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/R/vacamole/vacamole.docx -------------------------------------------------------------------------------- /R/vacamole/vacamole.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/R/vacamole/vacamole.pdf -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sir/pn_compose_sir.docx -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sir/pn_compose_sir.pdf -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirh/pn_compose_sirh.docx -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirh/pn_compose_sirh.pdf -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirv/pn_compose_sirv.docx -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirv/pn_compose_sirv.pdf -------------------------------------------------------------------------------- /pn_compose_sir_stages/pn_compose_sir_stages.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sir_stages/pn_compose_sir_stages.pdf -------------------------------------------------------------------------------- /pn_compose_sir_stages/pn_compose_sir_stages.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sir_stages/pn_compose_sir_stages.docx -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses.pdf -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses.docx -------------------------------------------------------------------------------- /R/vacamole/vacamole_files/figure-html/unnamed-chunk-8-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/R/vacamole/vacamole_files/figure-html/unnamed-chunk-8-1.png -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_two_risk_groups/pn_stratify_two_risk_groups.pdf -------------------------------------------------------------------------------- /R/vacamole/vacamole_files/figure-html/unnamed-chunk-11-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/R/vacamole/vacamole_files/figure-html/unnamed-chunk-11-1.png -------------------------------------------------------------------------------- /R/vacamole/vacamole_files/libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/R/vacamole/vacamole_files/libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_two_risk_groups/pn_stratify_two_risk_groups.docx -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-7-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-7-output-1.png -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-8-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-8-output-1.png -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sir/pn_compose_sir_files/libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-11-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-11-output-1.png -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirh/pn_compose_sirh_files/libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sirv/pn_compose_sirv_files/libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-12-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-12-output-1.png -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-13-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-13-output-1.png -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-14-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-14-output-1.png -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-3-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-3-output-1.png -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-4-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-4-output-1.png -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-6-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-6-output-1.png -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-8-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-8-output-1.png -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-9-output-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-9-output-1.png -------------------------------------------------------------------------------- /pn_compose_sir_stages/pn_compose_sir_stages_files/libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_compose_sir_stages/pn_compose_sir_stages_files/libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_ageclasses/pn_stratify_ageclasses_files/libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/epirecipes/EpiCats/HEAD/pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /pn_compose_sir/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | AlgebraicDynamics = "5fd6ff03-a254-427e-8840-ba658f502e32" 3 | AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" 4 | Catlab = "134e5e36-593f-5add-ad60-77f754baafbe" 5 | LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" 6 | OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" 7 | Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" 8 | -------------------------------------------------------------------------------- /pn_compose_sirh/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | AlgebraicDynamics = "5fd6ff03-a254-427e-8840-ba658f502e32" 3 | AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" 4 | Catlab = "134e5e36-593f-5add-ad60-77f754baafbe" 5 | LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" 6 | OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" 7 | Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" 8 | -------------------------------------------------------------------------------- /pn_compose_sirv/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | AlgebraicDynamics = "5fd6ff03-a254-427e-8840-ba658f502e32" 3 | AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" 4 | Catlab = "134e5e36-593f-5add-ad60-77f754baafbe" 5 | LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" 6 | OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" 7 | Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" 8 | -------------------------------------------------------------------------------- /pn_compose_sir_stages/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | AlgebraicDynamics = "5fd6ff03-a254-427e-8840-ba658f502e32" 3 | AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" 4 | Catlab = "134e5e36-593f-5add-ad60-77f754baafbe" 5 | LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" 6 | OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" 7 | Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" 8 | -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | AlgebraicDynamics = "5fd6ff03-a254-427e-8840-ba658f502e32" 3 | AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" 4 | Catlab = "134e5e36-593f-5add-ad60-77f754baafbe" 5 | LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" 6 | OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" 7 | Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" 8 | -------------------------------------------------------------------------------- /pn_stratify_ageclasses/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | AlgebraicABMs = "5a5e3447-9604-46e6-8d91-cb86f5f51721" 3 | AlgebraicDynamics = "5fd6ff03-a254-427e-8840-ba658f502e32" 4 | AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" 5 | Catlab = "134e5e36-593f-5add-ad60-77f754baafbe" 6 | Epidemics = "3842d2e4-6389-40c1-b4a0-39a6a39a1f90" 7 | LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" 8 | Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" 9 | ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" 10 | OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" 11 | Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" 12 | RCall = "6f49c342-dc21-5d91-9882-a32aef131414" 13 | StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Files generated by invoking Julia with --code-coverage 2 | *.jl.cov 3 | *.jl.*.cov 4 | 5 | # Files generated by invoking Julia with --track-allocation 6 | *.jl.mem 7 | 8 | # System-specific files and directories generated by the BinaryProvider and BinDeps packages 9 | # They contain absolute paths specific to the host computer, and so should not be committed 10 | deps/deps.jl 11 | deps/build.log 12 | deps/downloads/ 13 | deps/usr/ 14 | deps/src/ 15 | 16 | # Build artifacts for creating documentation generated by the Documenter package 17 | docs/build/ 18 | docs/site/ 19 | 20 | # File generated by Pkg, the package manager, based on a corresponding Project.toml 21 | # It records a fixed state of all packages used by the project. As such, it should not be 22 | # committed for packages, but should be committed for applications that require a static 23 | # environment. 24 | Manifest.toml 25 | 26 | .DS_Store 27 | 28 | .vscode 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 epirecipes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /R/vacamole/vacamole_files/libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /pn_compose_sir_stages/pn_compose_sir_stages_files/libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/figure-html/cell-9-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | I 17 | 18 | 19 | 20 | n2 21 | 22 | ω 23 | 24 | 25 | 26 | n1->n2 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/figure-commonmark/cell-9-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | I 17 | 18 | 19 | 20 | n2 21 | 22 | ω 23 | 24 | 25 | 26 | n1->n2 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/figure-html/cell-8-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | I 17 | 18 | 19 | 20 | n3 21 | 22 | γ 23 | 24 | 25 | 26 | n1->n3 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | R 36 | 37 | 38 | 39 | n3->n2 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-8-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n3 21 | 22 | σ 23 | 24 | 25 | 26 | n1->n3 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | R 36 | 37 | 38 | 39 | n3->n2 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/figure-commonmark/cell-8-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | I 17 | 18 | 19 | 20 | n3 21 | 22 | γ 23 | 24 | 25 | 26 | n1->n3 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | R 36 | 37 | 38 | 39 | n3->n2 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-commonmark/cell-8-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n3 21 | 22 | σ 23 | 24 | 25 | 26 | n1->n3 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | R 36 | 37 | 38 | 39 | n3->n2 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/figure-html/cell-7-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n3 21 | 22 | β 23 | 24 | 25 | 26 | n1->n3 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n3 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n3->n2 47 | 48 | 49 | 2 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /R/seirv/seirv.qmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "SEIRV" 3 | format: html 4 | --- 5 | 6 | This example is taken from the documentation of the R package [`epidemics`](https://github.com/epiverse-trace/epidemics/blob/main/vignettes/epidemics.Rmd). 7 | 8 | ```{r} 9 | # load epidemics 10 | library(epidemics) 11 | library(socialmixr) 12 | library(ggplot2) 13 | library(data.table) 14 | ``` 15 | 16 | ```{r} 17 | # load contact and population data from socialmixr::polymod 18 | polymod <- socialmixr::polymod 19 | contact_data <- socialmixr::contact_matrix( 20 | polymod, 21 | countries = "United Kingdom", 22 | age.limits = c(0, 20, 40), 23 | symmetric = TRUE 24 | ) 25 | 26 | # prepare contact matrix 27 | contact_matrix <- t(contact_data$matrix) 28 | 29 | # prepare the demography vector 30 | demography_vector <- contact_data$demography$population 31 | names(demography_vector) <- rownames(contact_matrix) 32 | ``` 33 | 34 | ```{r} 35 | # initial conditions: one in every 1 million is infected 36 | initial_i <- 1e-6 37 | initial_conditions <- c( 38 | S = 1 - initial_i, E = 0, I = initial_i, R = 0, V = 0 39 | ) 40 | 41 | # build for all age groups 42 | initial_conditions <- rbind( 43 | initial_conditions, 44 | initial_conditions, 45 | initial_conditions 46 | ) 47 | rownames(initial_conditions) <- rownames(contact_matrix) 48 | ``` 49 | 50 | ```{r} 51 | uk_population <- population( 52 | name = "UK", 53 | contact_matrix = contact_matrix, 54 | demography_vector = demography_vector, 55 | initial_conditions = initial_conditions 56 | ) 57 | uk_population 58 | ``` 59 | 60 | ```{r} 61 | # run an epidemic model using `epidemic()` 62 | system.time(output <- model_default( 63 | population=uk_population, 64 | transmission_rate = 1.3/7, 65 | infectiousness_rate = 1/2, 66 | recovery_rate = 1/7, 67 | intervention = NULL, 68 | vaccination = NULL, 69 | time_dependence = NULL, 70 | time_end = 600, 71 | increment = 1.0 72 | )) 73 | ``` 74 | 75 | ```{r} 76 | # plot figure of epidemic curve 77 | ggplot( 78 | output[compartment %in% c("exposed", "infectious")], 79 | aes( 80 | x = time, 81 | y = value, 82 | col = demography_group, 83 | linetype = compartment 84 | ) 85 | ) + 86 | geom_line() + 87 | scale_y_continuous( 88 | labels = scales::comma 89 | ) + 90 | scale_colour_brewer( 91 | palette = "Dark2", 92 | name = "Age group" 93 | ) + 94 | expand_limits( 95 | y = c(0, 500e3) 96 | ) + 97 | coord_cartesian( 98 | expand = FALSE 99 | ) + 100 | theme_classic() + 101 | theme( 102 | legend.position = "top" 103 | ) + 104 | labs( 105 | x = "Simulation time (days)", 106 | linetype = "Compartment", 107 | y = "Individuals" 108 | ) 109 | ``` 110 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/figure-commonmark/cell-7-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n3 21 | 22 | β 23 | 24 | 25 | 26 | n1->n3 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n3 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n3->n2 47 | 48 | 49 | 2 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/figure-html/cell-3-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | Pop 17 | 18 | 19 | 20 | n2 21 | 22 | infection 23 | 24 | 25 | 26 | n1->n2 27 | 28 | 29 | 2 30 | 31 | 32 | 33 | n3 34 | 35 | recovery 36 | 37 | 38 | 39 | n1->n3 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n2->n1 47 | 48 | 49 | 2 50 | 51 | 52 | 53 | n3->n1 54 | 55 | 56 | 1 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/figure-commonmark/cell-3-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | Pop 17 | 18 | 19 | 20 | n2 21 | 22 | infection 23 | 24 | 25 | 26 | n1->n2 27 | 28 | 29 | 2 30 | 31 | 32 | 33 | n3 34 | 35 | recovery 36 | 37 | 38 | 39 | n1->n3 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n2->n1 47 | 48 | 49 | 2 50 | 51 | 52 | 53 | n3->n1 54 | 55 | 56 | 1 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/figure-html/cell-11-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/figure-html/cell-7-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-7-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/figure-commonmark/cell-11-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/figure-commonmark/cell-7-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-commonmark/cell-7-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/figure-html/cell-4-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/figure-commonmark/cell-4-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n4 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n5 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n5 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | R 62 | 63 | 64 | 65 | n4->n2 66 | 67 | 68 | 2 69 | 70 | 71 | 72 | n5->n3 73 | 74 | 75 | 1 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /R/vacamole/vacamole_files/libs/quarto-html/quarto-syntax-highlighting.css: -------------------------------------------------------------------------------- 1 | /* quarto syntax highlight colors */ 2 | :root { 3 | --quarto-hl-ot-color: #003B4F; 4 | --quarto-hl-at-color: #657422; 5 | --quarto-hl-ss-color: #20794D; 6 | --quarto-hl-an-color: #5E5E5E; 7 | --quarto-hl-fu-color: #4758AB; 8 | --quarto-hl-st-color: #20794D; 9 | --quarto-hl-cf-color: #003B4F; 10 | --quarto-hl-op-color: #5E5E5E; 11 | --quarto-hl-er-color: #AD0000; 12 | --quarto-hl-bn-color: #AD0000; 13 | --quarto-hl-al-color: #AD0000; 14 | --quarto-hl-va-color: #111111; 15 | --quarto-hl-bu-color: inherit; 16 | --quarto-hl-ex-color: inherit; 17 | --quarto-hl-pp-color: #AD0000; 18 | --quarto-hl-in-color: #5E5E5E; 19 | --quarto-hl-vs-color: #20794D; 20 | --quarto-hl-wa-color: #5E5E5E; 21 | --quarto-hl-do-color: #5E5E5E; 22 | --quarto-hl-im-color: #00769E; 23 | --quarto-hl-ch-color: #20794D; 24 | --quarto-hl-dt-color: #AD0000; 25 | --quarto-hl-fl-color: #AD0000; 26 | --quarto-hl-co-color: #5E5E5E; 27 | --quarto-hl-cv-color: #5E5E5E; 28 | --quarto-hl-cn-color: #8f5902; 29 | --quarto-hl-sc-color: #5E5E5E; 30 | --quarto-hl-dv-color: #AD0000; 31 | --quarto-hl-kw-color: #003B4F; 32 | } 33 | 34 | /* other quarto variables */ 35 | :root { 36 | --quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 37 | } 38 | 39 | pre > code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-style: inherit; 89 | } 90 | 91 | code span.op { 92 | color: #5E5E5E; 93 | font-style: inherit; 94 | } 95 | 96 | code span.er { 97 | color: #AD0000; 98 | font-style: inherit; 99 | } 100 | 101 | code span.bn { 102 | color: #AD0000; 103 | font-style: inherit; 104 | } 105 | 106 | code span.al { 107 | color: #AD0000; 108 | font-style: inherit; 109 | } 110 | 111 | code span.va { 112 | color: #111111; 113 | font-style: inherit; 114 | } 115 | 116 | code span.bu { 117 | font-style: inherit; 118 | } 119 | 120 | code span.ex { 121 | font-style: inherit; 122 | } 123 | 124 | code span.pp { 125 | color: #AD0000; 126 | font-style: inherit; 127 | } 128 | 129 | code span.in { 130 | color: #5E5E5E; 131 | font-style: inherit; 132 | } 133 | 134 | code span.vs { 135 | color: #20794D; 136 | font-style: inherit; 137 | } 138 | 139 | code span.wa { 140 | color: #5E5E5E; 141 | font-style: italic; 142 | } 143 | 144 | code span.do { 145 | color: #5E5E5E; 146 | font-style: italic; 147 | } 148 | 149 | code span.im { 150 | color: #00769E; 151 | font-style: inherit; 152 | } 153 | 154 | code span.ch { 155 | color: #20794D; 156 | font-style: inherit; 157 | } 158 | 159 | code span.dt { 160 | color: #AD0000; 161 | font-style: inherit; 162 | } 163 | 164 | code span.fl { 165 | color: #AD0000; 166 | font-style: inherit; 167 | } 168 | 169 | code span.co { 170 | color: #5E5E5E; 171 | font-style: inherit; 172 | } 173 | 174 | code span.cv { 175 | color: #5E5E5E; 176 | font-style: italic; 177 | } 178 | 179 | code span.cn { 180 | color: #8f5902; 181 | font-style: inherit; 182 | } 183 | 184 | code span.sc { 185 | color: #5E5E5E; 186 | font-style: inherit; 187 | } 188 | 189 | code span.dv { 190 | color: #AD0000; 191 | font-style: inherit; 192 | } 193 | 194 | code span.kw { 195 | color: #003B4F; 196 | font-style: inherit; 197 | } 198 | 199 | .prevent-inlining { 200 | content: " code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-weight: bold; 89 | font-style: inherit; 90 | } 91 | 92 | code span.op { 93 | color: #5E5E5E; 94 | font-style: inherit; 95 | } 96 | 97 | code span.er { 98 | color: #AD0000; 99 | font-style: inherit; 100 | } 101 | 102 | code span.bn { 103 | color: #AD0000; 104 | font-style: inherit; 105 | } 106 | 107 | code span.al { 108 | color: #AD0000; 109 | font-style: inherit; 110 | } 111 | 112 | code span.va { 113 | color: #111111; 114 | font-style: inherit; 115 | } 116 | 117 | code span.bu { 118 | font-style: inherit; 119 | } 120 | 121 | code span.ex { 122 | font-style: inherit; 123 | } 124 | 125 | code span.pp { 126 | color: #AD0000; 127 | font-style: inherit; 128 | } 129 | 130 | code span.in { 131 | color: #5E5E5E; 132 | font-style: inherit; 133 | } 134 | 135 | code span.vs { 136 | color: #20794D; 137 | font-style: inherit; 138 | } 139 | 140 | code span.wa { 141 | color: #5E5E5E; 142 | font-style: italic; 143 | } 144 | 145 | code span.do { 146 | color: #5E5E5E; 147 | font-style: italic; 148 | } 149 | 150 | code span.im { 151 | color: #00769E; 152 | font-style: inherit; 153 | } 154 | 155 | code span.ch { 156 | color: #20794D; 157 | font-style: inherit; 158 | } 159 | 160 | code span.dt { 161 | color: #AD0000; 162 | font-style: inherit; 163 | } 164 | 165 | code span.fl { 166 | color: #AD0000; 167 | font-style: inherit; 168 | } 169 | 170 | code span.co { 171 | color: #5E5E5E; 172 | font-style: inherit; 173 | } 174 | 175 | code span.cv { 176 | color: #5E5E5E; 177 | font-style: italic; 178 | } 179 | 180 | code span.cn { 181 | color: #8f5902; 182 | font-style: inherit; 183 | } 184 | 185 | code span.sc { 186 | color: #5E5E5E; 187 | font-style: inherit; 188 | } 189 | 190 | code span.dv { 191 | color: #AD0000; 192 | font-style: inherit; 193 | } 194 | 195 | code span.kw { 196 | color: #003B4F; 197 | font-weight: bold; 198 | font-style: inherit; 199 | } 200 | 201 | .prevent-inlining { 202 | content: " code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-weight: bold; 89 | font-style: inherit; 90 | } 91 | 92 | code span.op { 93 | color: #5E5E5E; 94 | font-style: inherit; 95 | } 96 | 97 | code span.er { 98 | color: #AD0000; 99 | font-style: inherit; 100 | } 101 | 102 | code span.bn { 103 | color: #AD0000; 104 | font-style: inherit; 105 | } 106 | 107 | code span.al { 108 | color: #AD0000; 109 | font-style: inherit; 110 | } 111 | 112 | code span.va { 113 | color: #111111; 114 | font-style: inherit; 115 | } 116 | 117 | code span.bu { 118 | font-style: inherit; 119 | } 120 | 121 | code span.ex { 122 | font-style: inherit; 123 | } 124 | 125 | code span.pp { 126 | color: #AD0000; 127 | font-style: inherit; 128 | } 129 | 130 | code span.in { 131 | color: #5E5E5E; 132 | font-style: inherit; 133 | } 134 | 135 | code span.vs { 136 | color: #20794D; 137 | font-style: inherit; 138 | } 139 | 140 | code span.wa { 141 | color: #5E5E5E; 142 | font-style: italic; 143 | } 144 | 145 | code span.do { 146 | color: #5E5E5E; 147 | font-style: italic; 148 | } 149 | 150 | code span.im { 151 | color: #00769E; 152 | font-style: inherit; 153 | } 154 | 155 | code span.ch { 156 | color: #20794D; 157 | font-style: inherit; 158 | } 159 | 160 | code span.dt { 161 | color: #AD0000; 162 | font-style: inherit; 163 | } 164 | 165 | code span.fl { 166 | color: #AD0000; 167 | font-style: inherit; 168 | } 169 | 170 | code span.co { 171 | color: #5E5E5E; 172 | font-style: inherit; 173 | } 174 | 175 | code span.cv { 176 | color: #5E5E5E; 177 | font-style: italic; 178 | } 179 | 180 | code span.cn { 181 | color: #8f5902; 182 | font-style: inherit; 183 | } 184 | 185 | code span.sc { 186 | color: #5E5E5E; 187 | font-style: inherit; 188 | } 189 | 190 | code span.dv { 191 | color: #AD0000; 192 | font-style: inherit; 193 | } 194 | 195 | code span.kw { 196 | color: #003B4F; 197 | font-weight: bold; 198 | font-style: inherit; 199 | } 200 | 201 | .prevent-inlining { 202 | content: " code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-weight: bold; 89 | font-style: inherit; 90 | } 91 | 92 | code span.op { 93 | color: #5E5E5E; 94 | font-style: inherit; 95 | } 96 | 97 | code span.er { 98 | color: #AD0000; 99 | font-style: inherit; 100 | } 101 | 102 | code span.bn { 103 | color: #AD0000; 104 | font-style: inherit; 105 | } 106 | 107 | code span.al { 108 | color: #AD0000; 109 | font-style: inherit; 110 | } 111 | 112 | code span.va { 113 | color: #111111; 114 | font-style: inherit; 115 | } 116 | 117 | code span.bu { 118 | font-style: inherit; 119 | } 120 | 121 | code span.ex { 122 | font-style: inherit; 123 | } 124 | 125 | code span.pp { 126 | color: #AD0000; 127 | font-style: inherit; 128 | } 129 | 130 | code span.in { 131 | color: #5E5E5E; 132 | font-style: inherit; 133 | } 134 | 135 | code span.vs { 136 | color: #20794D; 137 | font-style: inherit; 138 | } 139 | 140 | code span.wa { 141 | color: #5E5E5E; 142 | font-style: italic; 143 | } 144 | 145 | code span.do { 146 | color: #5E5E5E; 147 | font-style: italic; 148 | } 149 | 150 | code span.im { 151 | color: #00769E; 152 | font-style: inherit; 153 | } 154 | 155 | code span.ch { 156 | color: #20794D; 157 | font-style: inherit; 158 | } 159 | 160 | code span.dt { 161 | color: #AD0000; 162 | font-style: inherit; 163 | } 164 | 165 | code span.fl { 166 | color: #AD0000; 167 | font-style: inherit; 168 | } 169 | 170 | code span.co { 171 | color: #5E5E5E; 172 | font-style: inherit; 173 | } 174 | 175 | code span.cv { 176 | color: #5E5E5E; 177 | font-style: italic; 178 | } 179 | 180 | code span.cn { 181 | color: #8f5902; 182 | font-style: inherit; 183 | } 184 | 185 | code span.sc { 186 | color: #5E5E5E; 187 | font-style: inherit; 188 | } 189 | 190 | code span.dv { 191 | color: #AD0000; 192 | font-style: inherit; 193 | } 194 | 195 | code span.kw { 196 | color: #003B4F; 197 | font-weight: bold; 198 | font-style: inherit; 199 | } 200 | 201 | .prevent-inlining { 202 | content: " code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-weight: bold; 89 | font-style: inherit; 90 | } 91 | 92 | code span.op { 93 | color: #5E5E5E; 94 | font-style: inherit; 95 | } 96 | 97 | code span.er { 98 | color: #AD0000; 99 | font-style: inherit; 100 | } 101 | 102 | code span.bn { 103 | color: #AD0000; 104 | font-style: inherit; 105 | } 106 | 107 | code span.al { 108 | color: #AD0000; 109 | font-style: inherit; 110 | } 111 | 112 | code span.va { 113 | color: #111111; 114 | font-style: inherit; 115 | } 116 | 117 | code span.bu { 118 | font-style: inherit; 119 | } 120 | 121 | code span.ex { 122 | font-style: inherit; 123 | } 124 | 125 | code span.pp { 126 | color: #AD0000; 127 | font-style: inherit; 128 | } 129 | 130 | code span.in { 131 | color: #5E5E5E; 132 | font-style: inherit; 133 | } 134 | 135 | code span.vs { 136 | color: #20794D; 137 | font-style: inherit; 138 | } 139 | 140 | code span.wa { 141 | color: #5E5E5E; 142 | font-style: italic; 143 | } 144 | 145 | code span.do { 146 | color: #5E5E5E; 147 | font-style: italic; 148 | } 149 | 150 | code span.im { 151 | color: #00769E; 152 | font-style: inherit; 153 | } 154 | 155 | code span.ch { 156 | color: #20794D; 157 | font-style: inherit; 158 | } 159 | 160 | code span.dt { 161 | color: #AD0000; 162 | font-style: inherit; 163 | } 164 | 165 | code span.fl { 166 | color: #AD0000; 167 | font-style: inherit; 168 | } 169 | 170 | code span.co { 171 | color: #5E5E5E; 172 | font-style: inherit; 173 | } 174 | 175 | code span.cv { 176 | color: #5E5E5E; 177 | font-style: italic; 178 | } 179 | 180 | code span.cn { 181 | color: #8f5902; 182 | font-style: inherit; 183 | } 184 | 185 | code span.sc { 186 | color: #5E5E5E; 187 | font-style: inherit; 188 | } 189 | 190 | code span.dv { 191 | color: #AD0000; 192 | font-style: inherit; 193 | } 194 | 195 | code span.kw { 196 | color: #003B4F; 197 | font-weight: bold; 198 | font-style: inherit; 199 | } 200 | 201 | .prevent-inlining { 202 | content: " code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-weight: bold; 89 | font-style: inherit; 90 | } 91 | 92 | code span.op { 93 | color: #5E5E5E; 94 | font-style: inherit; 95 | } 96 | 97 | code span.er { 98 | color: #AD0000; 99 | font-style: inherit; 100 | } 101 | 102 | code span.bn { 103 | color: #AD0000; 104 | font-style: inherit; 105 | } 106 | 107 | code span.al { 108 | color: #AD0000; 109 | font-style: inherit; 110 | } 111 | 112 | code span.va { 113 | color: #111111; 114 | font-style: inherit; 115 | } 116 | 117 | code span.bu { 118 | font-style: inherit; 119 | } 120 | 121 | code span.ex { 122 | font-style: inherit; 123 | } 124 | 125 | code span.pp { 126 | color: #AD0000; 127 | font-style: inherit; 128 | } 129 | 130 | code span.in { 131 | color: #5E5E5E; 132 | font-style: inherit; 133 | } 134 | 135 | code span.vs { 136 | color: #20794D; 137 | font-style: inherit; 138 | } 139 | 140 | code span.wa { 141 | color: #5E5E5E; 142 | font-style: italic; 143 | } 144 | 145 | code span.do { 146 | color: #5E5E5E; 147 | font-style: italic; 148 | } 149 | 150 | code span.im { 151 | color: #00769E; 152 | font-style: inherit; 153 | } 154 | 155 | code span.ch { 156 | color: #20794D; 157 | font-style: inherit; 158 | } 159 | 160 | code span.dt { 161 | color: #AD0000; 162 | font-style: inherit; 163 | } 164 | 165 | code span.fl { 166 | color: #AD0000; 167 | font-style: inherit; 168 | } 169 | 170 | code span.co { 171 | color: #5E5E5E; 172 | font-style: inherit; 173 | } 174 | 175 | code span.cv { 176 | color: #5E5E5E; 177 | font-style: italic; 178 | } 179 | 180 | code span.cn { 181 | color: #8f5902; 182 | font-style: inherit; 183 | } 184 | 185 | code span.sc { 186 | color: #5E5E5E; 187 | font-style: inherit; 188 | } 189 | 190 | code span.dv { 191 | color: #AD0000; 192 | font-style: inherit; 193 | } 194 | 195 | code span.kw { 196 | color: #003B4F; 197 | font-weight: bold; 198 | font-style: inherit; 199 | } 200 | 201 | .prevent-inlining { 202 | content: " code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-weight: bold; 89 | font-style: inherit; 90 | } 91 | 92 | code span.op { 93 | color: #5E5E5E; 94 | font-style: inherit; 95 | } 96 | 97 | code span.er { 98 | color: #AD0000; 99 | font-style: inherit; 100 | } 101 | 102 | code span.bn { 103 | color: #AD0000; 104 | font-style: inherit; 105 | } 106 | 107 | code span.al { 108 | color: #AD0000; 109 | font-style: inherit; 110 | } 111 | 112 | code span.va { 113 | color: #111111; 114 | font-style: inherit; 115 | } 116 | 117 | code span.bu { 118 | font-style: inherit; 119 | } 120 | 121 | code span.ex { 122 | font-style: inherit; 123 | } 124 | 125 | code span.pp { 126 | color: #AD0000; 127 | font-style: inherit; 128 | } 129 | 130 | code span.in { 131 | color: #5E5E5E; 132 | font-style: inherit; 133 | } 134 | 135 | code span.vs { 136 | color: #20794D; 137 | font-style: inherit; 138 | } 139 | 140 | code span.wa { 141 | color: #5E5E5E; 142 | font-style: italic; 143 | } 144 | 145 | code span.do { 146 | color: #5E5E5E; 147 | font-style: italic; 148 | } 149 | 150 | code span.im { 151 | color: #00769E; 152 | font-style: inherit; 153 | } 154 | 155 | code span.ch { 156 | color: #20794D; 157 | font-style: inherit; 158 | } 159 | 160 | code span.dt { 161 | color: #AD0000; 162 | font-style: inherit; 163 | } 164 | 165 | code span.fl { 166 | color: #AD0000; 167 | font-style: inherit; 168 | } 169 | 170 | code span.co { 171 | color: #5E5E5E; 172 | font-style: inherit; 173 | } 174 | 175 | code span.cv { 176 | color: #5E5E5E; 177 | font-style: italic; 178 | } 179 | 180 | code span.cn { 181 | color: #8f5902; 182 | font-style: inherit; 183 | } 184 | 185 | code span.sc { 186 | color: #5E5E5E; 187 | font-style: inherit; 188 | } 189 | 190 | code span.dv { 191 | color: #AD0000; 192 | font-style: inherit; 193 | } 194 | 195 | code span.kw { 196 | color: #003B4F; 197 | font-weight: bold; 198 | font-style: inherit; 199 | } 200 | 201 | .prevent-inlining { 202 | content: " 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | I 17 | 18 | 19 | 20 | n4 21 | 22 | η 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | H 36 | 37 | 38 | 39 | n5 40 | 41 | γₕ 42 | 43 | 44 | 45 | n2->n5 46 | 47 | 48 | 1 49 | 50 | 51 | 52 | n6 53 | 54 | ωₕ 55 | 56 | 57 | 58 | n2->n6 59 | 60 | 61 | 1 62 | 63 | 64 | 65 | n3 66 | 67 | R 68 | 69 | 70 | 71 | n4->n2 72 | 73 | 74 | 1 75 | 76 | 77 | 78 | n5->n3 79 | 80 | 81 | 1 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/figure-commonmark/cell-8-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | I 17 | 18 | 19 | 20 | n4 21 | 22 | η 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | H 36 | 37 | 38 | 39 | n5 40 | 41 | γₕ 42 | 43 | 44 | 45 | n2->n5 46 | 47 | 48 | 1 49 | 50 | 51 | 52 | n6 53 | 54 | ωₕ 55 | 56 | 57 | 58 | n2->n6 59 | 60 | 61 | 1 62 | 63 | 64 | 65 | n3 66 | 67 | R 68 | 69 | 70 | 71 | n4->n2 72 | 73 | 74 | 1 75 | 76 | 77 | 78 | n5->n3 79 | 80 | 81 | 1 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir.qmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: Composing an SIR model from individual transitions using AlgebraicPetri.jl 3 | date: 2023-06-13 4 | author: Simon Frost (@sdwfrost) 5 | format: 6 | html: default 7 | docx: default 8 | gfm: default 9 | pdf: default 10 | --- 11 | 12 | ## Introduction 13 | 14 | This example serves as a 'Hello World' to composing Petri net models, where models are 'glued' together using the shared states of the individual submodels. 15 | 16 | ## Libraries 17 | 18 | ```{julia} 19 | using AlgebraicPetri,AlgebraicPetri.TypedPetri 20 | using Catlab, Catlab.CategoricalAlgebra, Catlab.Programs 21 | using Catlab.WiringDiagrams, Catlab.Graphics 22 | using AlgebraicDynamics.UWDDynam 23 | using LabelledArrays 24 | using OrdinaryDiffEq 25 | using Plots 26 | ``` 27 | 28 | ## Transitions 29 | 30 | We first define a labelled Petri net that has the different types of transition in our models. The first argument is an array of state names as symbols (here, a generic `:Pop`), followed by the transitions in the model. Transitions are given as `transition_name=>((input_states)=>(output_states))`. 31 | 32 | ```{julia} 33 | epi_lpn = LabelledPetriNet( 34 | [:Pop], 35 | :infection=>((:Pop, :Pop)=>(:Pop, :Pop)), 36 | :recovery=>(:Pop=>:Pop) 37 | ); 38 | ``` 39 | 40 | Labelled Petri nets contain four types of fields; `S`, states or species; `T`, transitions; `I`, inputs; and `O`, outputs. 41 | 42 | Next, we define the transmission model (from susceptibles, `S` to infecteds, `I`) as an undirected wiring diagram using the `@relation` macro, referring to the transitions in our labelled Petri net above (`infection`). We include a reference to `Pop` in the definition of the state variables to allow us to do this. 43 | 44 | ```{julia} 45 | si_uwd = @relation (S, I) where (S::Pop, I::Pop) begin 46 | infection(S, I, I, I) 47 | end; 48 | ``` 49 | 50 | We then use `oapply_typed`, which takes in a labelled Petri net (here, `epi_lpn`) and an undirected wiring diagram (`si_uwd`), where each of the boxes is labeled by a symbol that matches the label of a transition in the Petri net, in addition to an array of symbols for each of the rates in the wiring diagram. This produces a Petri net given by colimiting the transitions together, and returns the `ACSetTransformation` from that Petri net to the type system. 51 | 52 | ```{julia} 53 | si_acst = oapply_typed(epi_lpn, si_uwd, [:β]); 54 | ``` 55 | 56 | To obtain the labelled Petri net, we extract the domain of the `ACSetTransformation` using `dom`. 57 | 58 | ```{julia} 59 | si_lpn = dom(si_acst); 60 | ``` 61 | 62 | We can obtain a GraphViz representation of the labelled Petri net using `to_graphviz`. 63 | 64 | ```{julia} 65 | to_graphviz(si_lpn) 66 | ``` 67 | 68 | We repeat for the recovery (`I` to `R`) transition. 69 | 70 | ```{julia} 71 | ir_uwd = @relation (I, R) where (I::Pop, R::Pop) begin 72 | recovery(I, R) 73 | end 74 | ir_acst = oapply_typed(epi_lpn, ir_uwd, [:γ]) 75 | ir_lpn = dom(ir_acst) 76 | to_graphviz(ir_lpn) 77 | ``` 78 | 79 | To glue the SI and IR models together to make an SIR model, we first define an undirected wiring diagram which contains all our states, and two transitions. 80 | 81 | ```{julia} 82 | sir_uwd = @relation (S, I, R) where (S::Pop, I::Pop, R::Pop) begin 83 | si(S, I) 84 | ir(I, R) 85 | end; 86 | ``` 87 | 88 | We then create a `StructuredMulticospan` using this wiring diagram, telling `oapply` that `si` in the wiring diagram corresponds to the `si_lpn` labelled Petri net, etc.. `Open` converts a PetriNet to an OpenPetriNet where each state is exposed as a leg of the cospan, allowing it to be composed over an undirected wiring diagram. 89 | 90 | ```{julia} 91 | sir_smc = oapply(sir_uwd, Dict( 92 | :si => Open(si_lpn), 93 | :ir => Open(ir_lpn), 94 | )); 95 | ``` 96 | 97 | We extract the labelled Petri net by extracting the object that is the codomain of all the legs, using the `apex` function. 98 | 99 | ```{julia} 100 | sir_lpn = apex(sir_smc) 101 | to_graphviz(sir_lpn) 102 | ``` 103 | 104 | ## Running the model 105 | 106 | To run an ODE model from the labelled Petri net, we generate a function that can be passed to SciML's `ODEProblem` using `vectorfield`. 107 | 108 | ```{julia} 109 | sir_vf = vectorfield(sir_lpn); 110 | ``` 111 | 112 | The initial conditions and parameter values are written as labelled arrays. 113 | 114 | ```{julia} 115 | u0 = @LArray [990.0, 10.0, 0.0] Tuple(snames(sir_lpn)) 116 | ``` 117 | 118 | ```{julia} 119 | p = @LArray [0.5/1000, 0.25] Tuple(tnames(sir_lpn)) 120 | ``` 121 | 122 | ```{julia} 123 | tspan = (0.0, 40.0); 124 | ``` 125 | 126 | We can now use the initial conditions, the time span, and the parameter values to simulate the system. 127 | 128 | ```{julia} 129 | sir_prob = ODEProblem(sir_vf, u0, tspan, p) 130 | sir_sol = solve(sir_prob, Rosenbrock32()) 131 | plot(sir_sol) 132 | ``` 133 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv.qmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: Adding vaccination to an SIR model using AlgebraicPetri.jl 3 | date: 2024-08-06 4 | author: Simon Frost (@sdwfrost) 5 | format: 6 | html: default 7 | docx: default 8 | gfm: default 9 | pdf: default 10 | --- 11 | 12 | ## Introduction 13 | 14 | This notebook demonstrates how to add a new transition between states to an existing model; in this case, adding vaccination to an SIR model. 15 | 16 | ## Libraries 17 | 18 | ```{julia} 19 | using AlgebraicPetri,AlgebraicPetri.TypedPetri 20 | using Catlab, Catlab.CategoricalAlgebra, Catlab.Programs 21 | using Catlab.WiringDiagrams, Catlab.Graphics 22 | using AlgebraicDynamics.UWDDynam 23 | using LabelledArrays 24 | using OrdinaryDiffEq 25 | using Plots 26 | ``` 27 | 28 | ## Transitions 29 | 30 | We first define a labelled Petri net that has the different types of transition in our models. The first argument is an array of state names as symbols (here, a generic `:Pop`), followed by the transitions in the model. Transitions are given as `transition_name=>((input_states)=>(output_states))`. 31 | 32 | ```{julia} 33 | epi_lpn = LabelledPetriNet( 34 | [:Pop], 35 | :infection=>((:Pop, :Pop)=>(:Pop, :Pop)), 36 | :recovery=>(:Pop=>:Pop), 37 | :vaccination=>(:Pop=>:Pop) 38 | ); 39 | ``` 40 | 41 | Labelled Petri nets contain four types of fields; `S`, states or species; `T`, transitions; `I`, inputs; and `O`, outputs. 42 | 43 | Next, we define the transmission model as an undirected wiring diagram using the `@relation` macro, referring to the transitions in our labelled Petri net above (`infection` and `recovery`). We include a reference to `Pop` in the definition of the state variables to allow us to do this. 44 | 45 | ```{julia} 46 | sir_uwd = @relation (S, I, R) where (S::Pop, I::Pop, R::Pop) begin 47 | infection(S, I, I, I) 48 | recovery(I, R) 49 | end; 50 | ``` 51 | 52 | We then use `oapply_typed`, which takes in a labelled Petri net (here, `epi_lpn`) and an undirected wiring diagram (`si_uwd`), where each of the boxes is labeled by a symbol that matches the label of a transition in the Petri net, in addition to an array of symbols for each of the rates in the wiring diagram. This produces a Petri net given by colimiting the transitions together, and returns the `ACSetTransformation` from that Petri net to the type system. 53 | 54 | ```{julia} 55 | sir_acst = oapply_typed(epi_lpn, sir_uwd, [:β, :γ]); 56 | ``` 57 | 58 | To obtain the labelled Petri net, we extract the domain of the `ACSetTransformation` using `dom`. 59 | 60 | ```{julia} 61 | sir_lpn = dom(sir_acst); 62 | ``` 63 | 64 | We can obtain a GraphViz representation of the labelled Petri net using `to_graphviz`. 65 | 66 | ```{julia} 67 | to_graphviz(sir_lpn) 68 | ``` 69 | 70 | We now define another model that considers transitions between `S` and `R` due to vaccination (at rate σ). 71 | 72 | ```{julia} 73 | v_uwd = @relation (S, R) where (S::Pop, R::Pop) begin 74 | vaccination(S, R) 75 | end 76 | v_acst = oapply_typed(epi_lpn, v_uwd, [:σ]) 77 | v_lpn = dom(v_acst) 78 | to_graphviz(v_lpn) 79 | ``` 80 | 81 | To glue the SI and vaccination models together to make an SIR model, we first define an undirected wiring diagram which contains all our states, and two transitions. 82 | 83 | ```{julia} 84 | sirv_uwd = @relation (S, I, R) where (S::Pop, I::Pop, R::Pop) begin 85 | sir(S, I, R) 86 | v(S, R) 87 | end; 88 | ``` 89 | 90 | We then create a `StructuredMulticospan` using this wiring diagram, telling `oapply` that `si` in the wiring diagram corresponds to the `si_lpn` labelled Petri net, etc.. `Open` converts a PetriNet to an OpenPetriNet where each state is exposed as a leg of the cospan, allowing it to be composed over an undirected wiring diagram. 91 | 92 | ```{julia} 93 | sirv_smc = oapply(sirv_uwd, Dict( 94 | :sir => Open(sir_lpn), 95 | :v => Open(v_lpn), 96 | )); 97 | ``` 98 | 99 | We extract the labelled Petri net by extracting the object that is the codomain of all the legs, using the `apex` function. 100 | 101 | ```{julia} 102 | sirv_lpn = apex(sirv_smc) 103 | to_graphviz(sirv_lpn) 104 | ``` 105 | 106 | ## Running the model 107 | 108 | To run an ODE model from the labelled Petri net, we generate a function that can be passed to SciML's `ODEProblem` using `vectorfield`. 109 | 110 | ```{julia} 111 | sirv_vf = vectorfield(sirv_lpn); 112 | ``` 113 | 114 | The initial conditions and parameter values are written as labelled arrays. 115 | 116 | ```{julia} 117 | u0 = @LArray [990.0, 10.0, 0.0] Tuple(snames(sirv_lpn)) 118 | ``` 119 | 120 | ```{julia} 121 | p = @LArray [0.5/1000, 0.25, 0.05] Tuple(tnames(sirv_lpn)) 122 | ``` 123 | 124 | ```{julia} 125 | tspan = (0.0, 40.0); 126 | ``` 127 | 128 | We can now use the initial conditions, the time span, and the parameter values to simulate the system. 129 | 130 | ```{julia} 131 | sirv_prob = ODEProblem(sirv_vf, u0, tspan, p) 132 | sirv_sol = solve(sirv_prob, Rosenbrock32()) 133 | plot(sirv_sol) 134 | ``` 135 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-html/cell-11-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n6 34 | 35 | σ 36 | 37 | 38 | 39 | n1->n6 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n2 47 | 48 | I 49 | 50 | 51 | 52 | n2->n4 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n5 60 | 61 | γ 62 | 63 | 64 | 65 | n2->n5 66 | 67 | 68 | 1 69 | 70 | 71 | 72 | n3 73 | 74 | R 75 | 76 | 77 | 78 | n4->n2 79 | 80 | 81 | 2 82 | 83 | 84 | 85 | n5->n3 86 | 87 | 88 | 1 89 | 90 | 91 | 92 | n6->n3 93 | 94 | 95 | 1 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/figure-commonmark/cell-11-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n4 21 | 22 | β 23 | 24 | 25 | 26 | n1->n4 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n6 34 | 35 | σ 36 | 37 | 38 | 39 | n1->n6 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n2 47 | 48 | I 49 | 50 | 51 | 52 | n2->n4 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n5 60 | 61 | γ 62 | 63 | 64 | 65 | n2->n5 66 | 67 | 68 | 1 69 | 70 | 71 | 72 | n3 73 | 74 | R 75 | 76 | 77 | 78 | n4->n2 79 | 80 | 81 | 2 82 | 83 | 84 | 85 | n5->n3 86 | 87 | 88 | 1 89 | 90 | 91 | 92 | n6->n3 93 | 94 | 95 | 1 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir.md: -------------------------------------------------------------------------------- 1 | # Composing an SIR model from individual transitions using 2 | AlgebraicPetri.jl 3 | Simon Frost (@sdwfrost) 4 | 2023-06-13 5 | 6 | ## Introduction 7 | 8 | This example serves as a ‘Hello World’ to composing Petri net models, 9 | where models are ‘glued’ together using the shared states of the 10 | individual submodels. 11 | 12 | ## Libraries 13 | 14 | ``` julia 15 | using AlgebraicPetri,AlgebraicPetri.TypedPetri 16 | using Catlab, Catlab.CategoricalAlgebra, Catlab.Programs 17 | using Catlab.WiringDiagrams, Catlab.Graphics 18 | using AlgebraicDynamics.UWDDynam 19 | using LabelledArrays 20 | using OrdinaryDiffEq 21 | using Plots 22 | ``` 23 | 24 | ## Transitions 25 | 26 | We first define a labelled Petri net that has the different types of 27 | transition in our models. The first argument is an array of state names 28 | as symbols (here, a generic `:Pop`), followed by the transitions in the 29 | model. Transitions are given as 30 | `transition_name=>((input_states)=>(output_states))`. 31 | 32 | ``` julia 33 | epi_lpn = LabelledPetriNet( 34 | [:Pop], 35 | :infection=>((:Pop, :Pop)=>(:Pop, :Pop)), 36 | :recovery=>(:Pop=>:Pop) 37 | ); 38 | ``` 39 | 40 | Labelled Petri nets contain four types of fields; `S`, states or 41 | species; `T`, transitions; `I`, inputs; and `O`, outputs. 42 | 43 | Next, we define the transmission model (from susceptibles, `S` to 44 | infecteds, `I`) as an undirected wiring diagram using the `@relation` 45 | macro, referring to the transitions in our labelled Petri net above 46 | (`infection`). We include a reference to `Pop` in the definition of the 47 | state variables to allow us to do this. 48 | 49 | ``` julia 50 | si_uwd = @relation (S, I) where (S::Pop, I::Pop) begin 51 | infection(S, I, I, I) 52 | end; 53 | ``` 54 | 55 | We then use `oapply_typed`, which takes in a labelled Petri net (here, 56 | `epi_lpn`) and an undirected wiring diagram (`si_uwd`), where each of 57 | the boxes is labeled by a symbol that matches the label of a transition 58 | in the Petri net, in addition to an array of symbols for each of the 59 | rates in the wiring diagram. This produces a Petri net given by 60 | colimiting the transitions together, and returns the 61 | `ACSetTransformation` from that Petri net to the type system. 62 | 63 | ``` julia 64 | si_acst = oapply_typed(epi_lpn, si_uwd, [:β]); 65 | ``` 66 | 67 | To obtain the labelled Petri net, we extract the domain of the 68 | `ACSetTransformation` using `dom`. 69 | 70 | ``` julia 71 | si_lpn = dom(si_acst); 72 | ``` 73 | 74 | We can obtain a GraphViz representation of the labelled Petri net using 75 | `to_graphviz`. 76 | 77 | ``` julia 78 | to_graphviz(si_lpn) 79 | ``` 80 | 81 | ![](pn_compose_sir_files/figure-commonmark/cell-7-output-1.svg) 82 | 83 | We repeat for the recovery (`I` to `R`) transition. 84 | 85 | ``` julia 86 | ir_uwd = @relation (I, R) where (I::Pop, R::Pop) begin 87 | recovery(I, R) 88 | end 89 | ir_acst = oapply_typed(epi_lpn, ir_uwd, [:γ]) 90 | ir_lpn = dom(ir_acst) 91 | to_graphviz(ir_lpn) 92 | ``` 93 | 94 | ![](pn_compose_sir_files/figure-commonmark/cell-8-output-1.svg) 95 | 96 | To glue the SI and IR models together to make an SIR model, we first 97 | define an undirected wiring diagram which contains all our states, and 98 | two transitions. 99 | 100 | ``` julia 101 | sir_uwd = @relation (S, I, R) where (S::Pop, I::Pop, R::Pop) begin 102 | si(S, I) 103 | ir(I, R) 104 | end; 105 | ``` 106 | 107 | We then create a `StructuredMulticospan` using this wiring diagram, 108 | telling `oapply` that `si` in the wiring diagram corresponds to the 109 | `si_lpn` labelled Petri net, etc.. `Open` converts a PetriNet to an 110 | OpenPetriNet where each state is exposed as a leg of the cospan, 111 | allowing it to be composed over an undirected wiring diagram. 112 | 113 | ``` julia 114 | sir_smc = oapply(sir_uwd, Dict( 115 | :si => Open(si_lpn), 116 | :ir => Open(ir_lpn), 117 | )); 118 | ``` 119 | 120 | We extract the labelled Petri net by extracting the object that is the 121 | codomain of all the legs, using the `apex` function. 122 | 123 | ``` julia 124 | sir_lpn = apex(sir_smc) 125 | to_graphviz(sir_lpn) 126 | ``` 127 | 128 | ![](pn_compose_sir_files/figure-commonmark/cell-11-output-1.svg) 129 | 130 | ## Running the model 131 | 132 | To run an ODE model from the labelled Petri net, we generate a function 133 | that can be passed to SciML’s `ODEProblem` using `vectorfield`. 134 | 135 | ``` julia 136 | sir_vf = vectorfield(sir_lpn); 137 | ``` 138 | 139 | The initial conditions and parameter values are written as labelled 140 | arrays. 141 | 142 | ``` julia 143 | u0 = @LArray [990.0, 10.0, 0.0] Tuple(snames(sir_lpn)) 144 | ``` 145 | 146 | 3-element LArray{Float64, 1, Vector{Float64}, (:S, :I, :R)}: 147 | :S => 990.0 148 | :I => 10.0 149 | :R => 0.0 150 | 151 | ``` julia 152 | p = @LArray [0.5/1000, 0.25] Tuple(tnames(sir_lpn)) 153 | ``` 154 | 155 | 2-element LArray{Float64, 1, Vector{Float64}, (:β, :γ)}: 156 | :β => 0.0005 157 | :γ => 0.25 158 | 159 | ``` julia 160 | tspan = (0.0, 40.0); 161 | ``` 162 | 163 | We can now use the initial conditions, the time span, and the parameter 164 | values to simulate the system. 165 | 166 | ``` julia 167 | sir_prob = ODEProblem(sir_vf, u0, tspan, p) 168 | sir_sol = solve(sir_prob, Rosenbrock32()) 169 | plot(sir_sol) 170 | ``` 171 | 172 | ![](pn_compose_sir_files/figure-commonmark/cell-16-output-1.svg) 173 | -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv.md: -------------------------------------------------------------------------------- 1 | # Adding vaccination to an SIR model using AlgebraicPetri.jl 2 | Simon Frost (@sdwfrost) 3 | 2024-08-06 4 | 5 | ## Introduction 6 | 7 | This notebook demonstrates how to add a new transition between states to 8 | an existing model; in this case, adding vaccination to an SIR model. 9 | 10 | ## Libraries 11 | 12 | ``` julia 13 | using AlgebraicPetri,AlgebraicPetri.TypedPetri 14 | using Catlab, Catlab.CategoricalAlgebra, Catlab.Programs 15 | using Catlab.WiringDiagrams, Catlab.Graphics 16 | using AlgebraicDynamics.UWDDynam 17 | using LabelledArrays 18 | using OrdinaryDiffEq 19 | using Plots 20 | ``` 21 | 22 | ## Transitions 23 | 24 | We first define a labelled Petri net that has the different types of 25 | transition in our models. The first argument is an array of state names 26 | as symbols (here, a generic `:Pop`), followed by the transitions in the 27 | model. Transitions are given as 28 | `transition_name=>((input_states)=>(output_states))`. 29 | 30 | ``` julia 31 | epi_lpn = LabelledPetriNet( 32 | [:Pop], 33 | :infection=>((:Pop, :Pop)=>(:Pop, :Pop)), 34 | :recovery=>(:Pop=>:Pop), 35 | :vaccination=>(:Pop=>:Pop) 36 | ); 37 | ``` 38 | 39 | Labelled Petri nets contain four types of fields; `S`, states or 40 | species; `T`, transitions; `I`, inputs; and `O`, outputs. 41 | 42 | Next, we define the transmission model as an undirected wiring diagram 43 | using the `@relation` macro, referring to the transitions in our 44 | labelled Petri net above (`infection` and `recovery`). We include a 45 | reference to `Pop` in the definition of the state variables to allow us 46 | to do this. 47 | 48 | ``` julia 49 | sir_uwd = @relation (S, I, R) where (S::Pop, I::Pop, R::Pop) begin 50 | infection(S, I, I, I) 51 | recovery(I, R) 52 | end; 53 | ``` 54 | 55 | We then use `oapply_typed`, which takes in a labelled Petri net (here, 56 | `epi_lpn`) and an undirected wiring diagram (`si_uwd`), where each of 57 | the boxes is labeled by a symbol that matches the label of a transition 58 | in the Petri net, in addition to an array of symbols for each of the 59 | rates in the wiring diagram. This produces a Petri net given by 60 | colimiting the transitions together, and returns the 61 | `ACSetTransformation` from that Petri net to the type system. 62 | 63 | ``` julia 64 | sir_acst = oapply_typed(epi_lpn, sir_uwd, [:β, :γ]); 65 | ``` 66 | 67 | To obtain the labelled Petri net, we extract the domain of the 68 | `ACSetTransformation` using `dom`. 69 | 70 | ``` julia 71 | sir_lpn = dom(sir_acst); 72 | ``` 73 | 74 | We can obtain a GraphViz representation of the labelled Petri net using 75 | `to_graphviz`. 76 | 77 | ``` julia 78 | to_graphviz(sir_lpn) 79 | ``` 80 | 81 | ![](pn_compose_sirv_files/figure-commonmark/cell-7-output-1.svg) 82 | 83 | We now define another model that considers transitions between `S` and 84 | `R` due to vaccination (at rate σ). 85 | 86 | ``` julia 87 | v_uwd = @relation (S, R) where (S::Pop, R::Pop) begin 88 | vaccination(S, R) 89 | end 90 | v_acst = oapply_typed(epi_lpn, v_uwd, [:σ]) 91 | v_lpn = dom(v_acst) 92 | to_graphviz(v_lpn) 93 | ``` 94 | 95 | ![](pn_compose_sirv_files/figure-commonmark/cell-8-output-1.svg) 96 | 97 | To glue the SI and vaccination models together to make an SIR model, we 98 | first define an undirected wiring diagram which contains all our states, 99 | and two transitions. 100 | 101 | ``` julia 102 | sirv_uwd = @relation (S, I, R) where (S::Pop, I::Pop, R::Pop) begin 103 | sir(S, I, R) 104 | v(S, R) 105 | end; 106 | ``` 107 | 108 | We then create a `StructuredMulticospan` using this wiring diagram, 109 | telling `oapply` that `si` in the wiring diagram corresponds to the 110 | `si_lpn` labelled Petri net, etc.. `Open` converts a PetriNet to an 111 | OpenPetriNet where each state is exposed as a leg of the cospan, 112 | allowing it to be composed over an undirected wiring diagram. 113 | 114 | ``` julia 115 | sirv_smc = oapply(sirv_uwd, Dict( 116 | :sir => Open(sir_lpn), 117 | :v => Open(v_lpn), 118 | )); 119 | ``` 120 | 121 | We extract the labelled Petri net by extracting the object that is the 122 | codomain of all the legs, using the `apex` function. 123 | 124 | ``` julia 125 | sirv_lpn = apex(sirv_smc) 126 | to_graphviz(sirv_lpn) 127 | ``` 128 | 129 | ![](pn_compose_sirv_files/figure-commonmark/cell-11-output-1.svg) 130 | 131 | ## Running the model 132 | 133 | To run an ODE model from the labelled Petri net, we generate a function 134 | that can be passed to SciML’s `ODEProblem` using `vectorfield`. 135 | 136 | ``` julia 137 | sirv_vf = vectorfield(sirv_lpn); 138 | ``` 139 | 140 | The initial conditions and parameter values are written as labelled 141 | arrays. 142 | 143 | ``` julia 144 | u0 = @LArray [990.0, 10.0, 0.0] Tuple(snames(sirv_lpn)) 145 | ``` 146 | 147 | 3-element LArray{Float64, 1, Vector{Float64}, (:S, :I, :R)}: 148 | :S => 990.0 149 | :I => 10.0 150 | :R => 0.0 151 | 152 | ``` julia 153 | p = @LArray [0.5/1000, 0.25, 0.05] Tuple(tnames(sirv_lpn)) 154 | ``` 155 | 156 | 3-element LArray{Float64, 1, Vector{Float64}, (:β, :γ, :σ)}: 157 | :β => 0.0005 158 | :γ => 0.25 159 | :σ => 0.05 160 | 161 | ``` julia 162 | tspan = (0.0, 40.0); 163 | ``` 164 | 165 | We can now use the initial conditions, the time span, and the parameter 166 | values to simulate the system. 167 | 168 | ``` julia 169 | sirv_prob = ODEProblem(sirv_vf, u0, tspan, p) 170 | sirv_sol = solve(sirv_prob, Rosenbrock32()) 171 | plot(sirv_sol) 172 | ``` 173 | 174 | ![](pn_compose_sirv_files/figure-commonmark/cell-16-output-1.svg) 175 | -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh.qmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: Adding hospitalization to an SIR model using AlgebraicPetri.jl 3 | date: 2024-08-06 4 | author: Simon Frost (@sdwfrost) 5 | format: 6 | html: default 7 | docx: default 8 | gfm: default 9 | pdf: default 10 | --- 11 | 12 | ## Introduction 13 | 14 | This notebook demonstrates how to add a new states to an existing model; in this case, adding hospitalization to an SIR model. 15 | 16 | ## Libraries 17 | 18 | ```{julia} 19 | using AlgebraicPetri,AlgebraicPetri.TypedPetri 20 | using Catlab, Catlab.CategoricalAlgebra, Catlab.Programs 21 | using Catlab.WiringDiagrams, Catlab.Graphics 22 | using AlgebraicDynamics.UWDDynam 23 | using LabelledArrays 24 | using OrdinaryDiffEq 25 | using Plots 26 | ``` 27 | 28 | ## Transitions 29 | 30 | We first define a labelled Petri net that has the different types of transition in our models. The first argument is an array of state names as symbols (here, a generic `:Pop`), followed by the transitions in the model. Transitions are given as `transition_name=>((input_states)=>(output_states))`. 31 | 32 | ```{julia} 33 | epi_lpn = LabelledPetriNet( 34 | [:Pop], 35 | :infection=>((:Pop, :Pop)=>(:Pop, :Pop)), 36 | :recovery=>(:Pop=>:Pop), 37 | :hospitalization=>(:Pop=>:Pop), 38 | :death=>(:Pop=>()) 39 | ); 40 | ``` 41 | 42 | Labelled Petri nets contain four types of fields; `S`, states or species; `T`, transitions; `I`, inputs; and `O`, outputs. 43 | 44 | Next, we define the transmission model as an undirected wiring diagram using the `@relation` macro, referring to the transitions in our labelled Petri net above (`infection` and `recovery`). We include a reference to `Pop` in the definition of the state variables to allow us to do this. 45 | 46 | ```{julia} 47 | sir_uwd = @relation (S, I, R) where (S::Pop, I::Pop, R::Pop) begin 48 | infection(S, I, I, I) 49 | recovery(I, R) 50 | end; 51 | ``` 52 | 53 | We then use `oapply_typed`, which takes in a labelled Petri net (here, `epi_lpn`) and an undirected wiring diagram (`si_uwd`), where each of the boxes is labeled by a symbol that matches the label of a transition in the Petri net, in addition to an array of symbols for each of the rates in the wiring diagram. This produces a Petri net given by colimiting the transitions together, and returns the `ACSetTransformation` from that Petri net to the type system. 54 | 55 | ```{julia} 56 | sir_acst = oapply_typed(epi_lpn, sir_uwd, [:β, :γ]); 57 | ``` 58 | 59 | To obtain the labelled Petri net, we extract the domain of the `ACSetTransformation` using `dom`. 60 | 61 | ```{julia} 62 | sir_lpn = dom(sir_acst); 63 | ``` 64 | 65 | We can obtain a GraphViz representation of the labelled Petri net using `to_graphviz`. 66 | 67 | ```{julia} 68 | to_graphviz(sir_lpn) 69 | ``` 70 | 71 | We now define another model that considers another population representing individuals that are hospitalized following infection, and either recover or die. 72 | 73 | ```{julia} 74 | h_uwd = @relation (I, H, R) where (I::Pop, H::Pop, R::Pop) begin 75 | hospitalization(I, H) 76 | recovery(H, R) 77 | death(H) 78 | end 79 | h_acst = oapply_typed(epi_lpn, h_uwd, [:η, :γₕ, :ωₕ]) 80 | h_lpn = dom(h_acst) 81 | to_graphviz(h_lpn) 82 | ``` 83 | 84 | We also add death due to infection to the model. 85 | 86 | ```{julia} 87 | i_uwd = @relation (I,) where (I::Pop,) begin 88 | death(I) 89 | end 90 | i_acst = oapply_typed(epi_lpn, i_uwd, [:ω]) 91 | i_lpn = dom(i_acst) 92 | to_graphviz(i_lpn) 93 | ``` 94 | 95 | To glue the models together, we first define an undirected wiring diagram which contains all our states, and two transitions. 96 | 97 | ```{julia} 98 | sirh_uwd = @relation (S, I, R, H) where (S::Pop, I::Pop, R::Pop, H::Pop) begin 99 | sir(S, I, R) 100 | h(I, H, R) 101 | i(I) 102 | end; 103 | ``` 104 | 105 | We then create a `StructuredMulticospan` using this wiring diagram, telling `oapply` that `si` in the wiring diagram corresponds to the `si_lpn` labelled Petri net, etc.. `Open` converts a PetriNet to an OpenPetriNet where each state is exposed as a leg of the cospan, allowing it to be composed over an undirected wiring diagram. 106 | 107 | ```{julia} 108 | sirh_smc = oapply(sirh_uwd, Dict( 109 | :sir => Open(sir_lpn), 110 | :h => Open(h_lpn), 111 | :i => Open(i_lpn) 112 | )); 113 | ``` 114 | 115 | We extract the labelled Petri net by extracting the object that is the codomain of all the legs, using the `apex` function. 116 | 117 | ```{julia} 118 | sirh_lpn = apex(sirh_smc) 119 | to_graphviz(sirh_lpn) 120 | ``` 121 | 122 | ## Running the model 123 | 124 | To run an ODE model from the labelled Petri net, we generate a function that can be passed to SciML's `ODEProblem` using `vectorfield`. 125 | 126 | ```{julia} 127 | sirh_vf = vectorfield(sirh_lpn); 128 | ``` 129 | 130 | The initial conditions and parameter values are written as labelled arrays. We can (and should) check the ordering of these variables. 131 | 132 | ```{julia} 133 | snames(sirh_lpn) 134 | ``` 135 | 136 | ```{julia} 137 | u0 = @LArray [990.0, 10.0, 0.0, 0.0] Tuple(snames(sirh_lpn)) 138 | ``` 139 | 140 | ```{julia} 141 | tnames(sirh_lpn) 142 | ``` 143 | 144 | ```{julia} 145 | p = @LArray [0.5/1000, 0.25, 0.05, 0.2, 0.05, 0.05] Tuple(tnames(sirh_lpn)) 146 | ``` 147 | 148 | ```{julia} 149 | tspan = (0.0, 40.0); 150 | ``` 151 | 152 | We can now use the initial conditions, the time span, and the parameter values to simulate the system. 153 | 154 | ```{julia} 155 | sirh_prob = ODEProblem(sirh_vf, u0, tspan, p) 156 | sirh_sol = solve(sirh_prob, Rosenbrock32()) 157 | plot(sirh_sol) 158 | ``` 159 | -------------------------------------------------------------------------------- /pn_compose_sir/pn_compose_sir_files/libs/quarto-html/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v5.0.0 - 2023-01-18 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2023 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pn_compose_sirh/pn_compose_sirh_files/libs/quarto-html/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v5.0.0 - 2023-01-18 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2023 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pn_compose_sirv/pn_compose_sirv_files/libs/quarto-html/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v5.0.0 - 2023-01-18 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2023 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pn_compose_sir_stages/pn_compose_sir_stages_files/libs/quarto-html/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v5.0.0 - 2023-01-18 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2023 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/libs/quarto-html/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v5.0.0 - 2023-01-18 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2023 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pn_stratify_two_risk_groups/pn_stratify_two_risk_groups_files/libs/quarto-html/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v5.0.0 - 2023-01-18 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2023 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-3-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | Pop 17 | 18 | 19 | 20 | n2 21 | 22 | infection 23 | 24 | 25 | 26 | n1->n2 27 | 28 | 29 | 2 30 | 31 | 32 | 33 | n3 34 | 35 | exposure 36 | 37 | 38 | 39 | n1->n3 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n4 47 | 48 | recovery 49 | 50 | 51 | 52 | n1->n4 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n5 60 | 61 | strata 62 | 63 | 64 | 65 | n1->n5 66 | 67 | 68 | 1 69 | 70 | 71 | 72 | n2->n1 73 | 74 | 75 | 2 76 | 77 | 78 | 79 | n3->n1 80 | 81 | 82 | 1 83 | 84 | 85 | 86 | n4->n1 87 | 88 | 89 | 1 90 | 91 | 92 | 93 | n5->n1 94 | 95 | 96 | 1 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-commonmark/cell-3-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | Pop 17 | 18 | 19 | 20 | n2 21 | 22 | infection 23 | 24 | 25 | 26 | n1->n2 27 | 28 | 29 | 2 30 | 31 | 32 | 33 | n3 34 | 35 | exposure 36 | 37 | 38 | 39 | n1->n3 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n4 47 | 48 | recovery 49 | 50 | 51 | 52 | n1->n4 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n5 60 | 61 | strata 62 | 63 | 64 | 65 | n1->n5 66 | 67 | 68 | 1 69 | 70 | 71 | 72 | n2->n1 73 | 74 | 75 | 2 76 | 77 | 78 | 79 | n3->n1 80 | 81 | 82 | 1 83 | 84 | 85 | 86 | n4->n1 87 | 88 | 89 | 1 90 | 91 | 92 | 93 | n5->n1 94 | 95 | 96 | 1 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /R/vacamole/vacamole_files/libs/quarto-html/anchor.min.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 2 | // 3 | // AnchorJS - v4.3.1 - 2021-04-17 4 | // https://www.bryanbraun.com/anchorjs/ 5 | // Copyright (c) 2021 Bryan Braun; Licensed MIT 6 | // 7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat 8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function d(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function w(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],d(this.options),this.isTouchDevice=function(){return Boolean("ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,o,i,n,s,a,c,r,l,h,u,p=[];if(d(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=w(A=A||"h2, h3, h4, h5, h6")).length)return this;for(null===document.head.querySelector("style.anchorjs")&&((u=document.createElement("style")).className="anchorjs",u.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(u):document.head.insertBefore(u,A),u.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",u.sheet.cssRules.length),u.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",u.sheet.cssRules.length),u.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",u.sheet.cssRules.length),u.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',u.sheet.cssRules.length)),u=document.querySelectorAll("[id]"),t=[].map.call(u,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-html/cell-4-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n5 21 | 22 | β 23 | 24 | 25 | 26 | n1->n5 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n5 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n7 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n7 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | E 62 | 63 | 64 | 65 | n6 66 | 67 | σ 68 | 69 | 70 | 71 | n3->n6 72 | 73 | 74 | 1 75 | 76 | 77 | 78 | n4 79 | 80 | R 81 | 82 | 83 | 84 | n5->n2 85 | 86 | 87 | 1 88 | 89 | 90 | 91 | n5->n3 92 | 93 | 94 | 1 95 | 96 | 97 | 98 | n6->n2 99 | 100 | 101 | 1 102 | 103 | 104 | 105 | n7->n4 106 | 107 | 108 | 1 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /pn_stratify_ageclasses/pn_stratify_ageclasses_files/figure-commonmark/cell-4-output-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | G 11 | 12 | 13 | 14 | n1 15 | 16 | S 17 | 18 | 19 | 20 | n5 21 | 22 | β 23 | 24 | 25 | 26 | n1->n5 27 | 28 | 29 | 1 30 | 31 | 32 | 33 | n2 34 | 35 | I 36 | 37 | 38 | 39 | n2->n5 40 | 41 | 42 | 1 43 | 44 | 45 | 46 | n7 47 | 48 | γ 49 | 50 | 51 | 52 | n2->n7 53 | 54 | 55 | 1 56 | 57 | 58 | 59 | n3 60 | 61 | E 62 | 63 | 64 | 65 | n6 66 | 67 | σ 68 | 69 | 70 | 71 | n3->n6 72 | 73 | 74 | 1 75 | 76 | 77 | 78 | n4 79 | 80 | R 81 | 82 | 83 | 84 | n5->n2 85 | 86 | 87 | 1 88 | 89 | 90 | 91 | n5->n3 92 | 93 | 94 | 1 95 | 96 | 97 | 98 | n6->n2 99 | 100 | 101 | 1 102 | 103 | 104 | 105 | n7->n4 106 | 107 | 108 | 1 109 | 110 | 111 | 112 | --------------------------------------------------------------------------------