From bc29d910a7820043f413d70f97382fbd51942f03 Mon Sep 17 00:00:00 2001 From: adamkucharski Date: Fri, 19 Jan 2024 18:23:08 +0000 Subject: [PATCH] Tidy comments --- vignettes/case_study_4_inference.Rmd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vignettes/case_study_4_inference.Rmd b/vignettes/case_study_4_inference.Rmd index 3e66e22..a3c39bd 100644 --- a/vignettes/case_study_4_inference.Rmd +++ b/vignettes/case_study_4_inference.Rmd @@ -341,8 +341,7 @@ pred_rural <- predict(b_rural,new_dat,type="response",se=TRUE) attack_est <- function(pos_1, # positive at age i pos_2 # positive at age i+1 ){ - # Note: need to account for people who have already waned... - # Calculate susceptibility at age i, accounting for waning immunity + # Calculate remaining susceptibility at age i susceptible_1 <- (1-pos_1) # Calculate proportion of susceptible group infected @@ -352,7 +351,7 @@ attack_est <- function(pos_1, # positive at age i } -# Calculate discrete derivative: +# Calculate attack rates: vec1 <- head(pred_urban$fit,-1) # drop last entry vec2 <- tail(pred_urban$fit,-1) # drop first entry deriv_val_urban <- attack_est(vec1,vec2)