Skip to content

Commit

Permalink
Tidy comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkucharski committed Jan 19, 2024
1 parent e0af772 commit bc29d91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vignettes/case_study_4_inference.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit bc29d91

Please sign in to comment.