Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about surveillance_create_expectedCases() #55

Open
Hanmeng-Xu opened this issue Jun 23, 2022 · 1 comment
Open

Question about surveillance_create_expectedCases() #55

Hanmeng-Xu opened this issue Jun 23, 2022 · 1 comment

Comments

@Hanmeng-Xu
Copy link
Collaborator

In this function, the multiplication is looping through only up to the most recent 5 years (because we know that there is no effect left from the vaccine campaign conducted more than 5 years age), while this does spare us time on looping all the previous vaccine campaign years, but just wondering in this way, whether the population changes in the previous years (more than 5 years ago) are not taken in to account in the calculation?

@KaiyueZou
Copy link
Collaborator

KaiyueZou commented Jun 24, 2022

I am thinking that you might have meant the function update_sus_rasterStack_optimized?

# popk is the pop in year k and popj is the pop in year j (k < j)
# pkj is the vaccinated proportion of population (taking into consideration deaths, new births, immigration, etc.) between year k and year j
pkj <- raster::overlay(popk, popj, fun = function(x, y){x*(1-((j-k)*mu))/y}) 
# the waned effectiveness of vaccines received in year k in year j
ve_j_k <- as.numeric(ve_direct(j-k+1))

# year-j-still-protected proportion of population that received vaccines in year k
prob_still_protected_admin1 <- raster::overlay(vacck_admin1, pkj, fun = function(x, y){return(x*y*ve_j_k)}) 
prob_still_protected_admin2 <- raster::overlay(vacck_admin2, pkj, fun = function(x, y){return(x*y*ve_j_k)}) 

To me, I think given that we only want to think about the still protected population that received year-k vaccines in year j, we only need to consider the general pop change between year k and j. If the vacc year is more than 5 years ago, we don't need to think about the protected population proportion anymore, so, we also don't need to think about the pop change that happened more than 5 years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants