From ba3da4fbb05c787655350b987416f60d35de019d Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Thu, 19 Oct 2023 13:29:31 -0400 Subject: [PATCH 01/10] in progress --- vignettes/tutorial.Rmd | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vignettes/tutorial.Rmd b/vignettes/tutorial.Rmd index 51315eea..36390f38 100644 --- a/vignettes/tutorial.Rmd +++ b/vignettes/tutorial.Rmd @@ -5,6 +5,7 @@ date: "`r Sys.Date()`" output: rmarkdown::html_vignette: toc: yes + number-sections: yes header-includes: "\\DeclareUnicodeCharacter{2010}{-}" bibliography: ../references.bib fontsize: 11pt @@ -82,9 +83,9 @@ b) time to reach peak antibody concentration, c) magnitude of the peak concentration, and d) antibody decay parameters describing the time course (shape and rate) of antibody decay. -A model description that is used for the serocalculator is described in [@Simonsen_2009; @Teunis_2012]. An alternative +A model description that is used for the serocalculator is described in @Simonsen_2009 and @Teunis_2012. An alternative model, simplified but with improved interpretation of the underlying biological mechanisms, is given -in [@de_Graaf_2014] and further improved in [@Teunis_2016]. +in @de_Graaf_2014 and further improved in @Teunis_2016. The current model assumes that upon exposure to an initial inoculum, pathogen concentrations increase exponentially. Presence of pathogens (antigen presented to the immune system) signals an @@ -94,13 +95,13 @@ causes inactivation or die–off of pathogens, with a rate proportional to the s concentration. Ultimately, when all pathogens are removed, infection is over and the promotion of antibody production stops. Then the decay phase starts, and serum antibody concentrations decrease. Antibody decay in the serum compartment may start fast and slow down later, resulting in -non–exponential decay. In [@Teunis_2016] this is modelled using a shape parameter, allowing gradual adjustment +non–exponential decay. In @Teunis_2016 this is modelled using a shape parameter, allowing gradual adjustment between exponential (log–linear) and strongly non–exponential decay. ## Heterogenity The five parameters describing the seroresponse (in round brackets names of corresponding -parameters used in the package, see [section 3.2.2](#longParams) for details): baseline antibody +parameters used in the package, see @sec-longParams for details): baseline antibody concentration (`y0` and `yb`), time to peak (`t1`), peak antibody concentration (`y1`), decay rate (`alpha`) and shape factor of the decay curve (`r`) are not fixed numbers. In a population of subjects, individuals each have their own seroresponse, different from those of other subjects. @@ -298,7 +299,7 @@ Then it can be loaded into R like this: serologyData <- read.csv(file = "C:\\cross-sectional-data.csv") ``` -### Specifying longitudinal response parameters {#longParams} +### Specifying longitudinal response parameters {#sec-longParams} The longitudinal response parameters set consists of the following items: From cffc82bb6ba6d5af89f5ac78402ee23d5ef325c8 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Thu, 19 Oct 2023 13:34:26 -0400 Subject: [PATCH 02/10] add numbers --- vignettes/tutorial.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vignettes/tutorial.Rmd b/vignettes/tutorial.Rmd index 36390f38..64e2dbd7 100644 --- a/vignettes/tutorial.Rmd +++ b/vignettes/tutorial.Rmd @@ -3,9 +3,9 @@ title: "Serocalculator package tutorial" author: "UC Davis SeroEpidemiology Group" date: "`r Sys.Date()`" output: - rmarkdown::html_vignette: - toc: yes - number-sections: yes + bookdown::html_document2: + base_format: rmarkdown::html_vignette + toc: true header-includes: "\\DeclareUnicodeCharacter{2010}{-}" bibliography: ../references.bib fontsize: 11pt From b3695de3e501789d3b0a98d3613d01238e48e958 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Thu, 19 Oct 2023 13:47:26 -0400 Subject: [PATCH 03/10] fixed --- vignettes/tutorial.Rmd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vignettes/tutorial.Rmd b/vignettes/tutorial.Rmd index cd0aa8be..d16e9351 100644 --- a/vignettes/tutorial.Rmd +++ b/vignettes/tutorial.Rmd @@ -2,9 +2,10 @@ title: "Serocalculator package tutorial" author: "UC Davis SeroEpidemiology Group" date: "`r Sys.Date()`" +output: bookdown::html_document2: - base_format: rmarkdown::html_vignette - toc: true + base_format: rmarkdown::html_vignette + toc: true header-includes: "\\DeclareUnicodeCharacter{2010}{-}" bibliography: ../references.bib fontsize: 11pt @@ -100,7 +101,7 @@ between exponential (log–linear) and strongly non–exponential decay. ## Heterogenity The five parameters describing the seroresponse (in round brackets names of corresponding -parameters used in the package, see @sec-longParams for details): baseline antibody +parameters used in the package, see Section \@ref(longParams) for details): baseline antibody concentration (`y0` and `yb`), time to peak (`t1`), peak antibody concentration (`y1`), decay rate (`alpha`) and shape factor of the decay curve (`r`) are not fixed numbers. In a population of subjects, individuals each have their own seroresponse, different from those of other subjects. @@ -293,7 +294,7 @@ Then it can be loaded into R like this: serologyData <- read.csv(file = "C:\\cross-sectional-data.csv") ``` -### Specifying longitudinal response parameters {#sec-longParams} +### Specifying longitudinal response parameters {#longParams} The longitudinal response parameters set consists of the following items: From 21b8bed2ac3be922daff63efc48302d4ce4eb351 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Thu, 19 Oct 2023 14:13:11 -0400 Subject: [PATCH 04/10] in progress --- references.bib | 4 ++-- vignettes/.gitignore | 1 + vignettes/methodology.Rmd | 6 +++--- vignettes/tutorial.Rmd | 30 +++++++++++++++--------------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/references.bib b/references.bib index 187a0805..e0133adf 100644 --- a/references.bib +++ b/references.bib @@ -20,7 +20,7 @@ @article{Simonsen_2009 volume = {28}, number = {14}, pages = {1882--1895}, - author = {J. Simonsen and K. M{\o}lbak and G. Falkenhorst and K. A. Krogfelt and A. Linneberg and P. F. M. Teunis}, + author = {J. Simonsen and K. M{\o}lbak and G. Falkenhorst and K. A. Krogfelt and A. Linneberg and P.F.M. Teunis}, title = {Estimation of incidences of infectious diseases based on antibody measurements}, journal = {Statistics in Medicine} } @@ -34,7 +34,7 @@ @article{Teunis_2012 volume = {31}, number = {20}, pages = {2240--2248}, - author = {PFM Teunis and JCH van Eijkeren and CW Ang and YTHP van Duynhoven and JB Simonsen and MA Strid and W van Pelt}, + author = {P.F.M. Teunis and JCH van Eijkeren and CW Ang and YTHP van Duynhoven and JB Simonsen and MA Strid and W van Pelt}, title = {Biomarker dynamics: estimating infection rates from serological data}, journal = {Statistics in Medicine} } diff --git a/vignettes/.gitignore b/vignettes/.gitignore index 097b2416..01b6080a 100644 --- a/vignettes/.gitignore +++ b/vignettes/.gitignore @@ -1,2 +1,3 @@ *.html *.R +methodology.log diff --git a/vignettes/methodology.Rmd b/vignettes/methodology.Rmd index b77b59a0..ff2dca0e 100644 --- a/vignettes/methodology.Rmd +++ b/vignettes/methodology.Rmd @@ -3,10 +3,10 @@ title: "Serocalculator package methodology" author: "European Centre for Disease Prevention and Control (ECDC)" date: '`r Sys.Date()`' output: - rmarkdown::html_vignette: - toc: yes pdf_document: toc: yes + rmarkdown::html_vignette: + toc: yes header-includes: - \usepackage{subfigure} \DeclareUnicodeCharacter{2010}{-} @@ -141,8 +141,8 @@ references: fontsize: 11pt vignette: > %\VignetteIndexEntry{Serocalculator package methodology} - %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} + %\VignetteEngine{knitr::rmarkdown} ---