Skip to content

Commit

Permalink
adjusted scaling in xds_cohort: eir is the daily eir
Browse files Browse the repository at this point in the history
  • Loading branch information
smitdave committed Sep 26, 2024
1 parent d267a06 commit 33b8a3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/xde_cohort.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ xds_solve_cohort = function(pars, bday=0, A = 10, da = 10){

stats::integrate(F_eir, 0, 365, bday=0)$val -> scale

pars$EIRpar$scale = scale
pars$EIRpar$scale = scale*365

F_eir <- with(pars$EIRpar, function(age, bday){
eir/scale*F_season(age+bday)*F_trend(age+bday)*F_age(age)
Expand Down
2 changes: 1 addition & 1 deletion R/xds_setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ xds_setup_cohort = function(eir=1,

stats::integrate(F_eir, 0, 365, bday=0)$val -> scale

pars$EIRpar$scale = scale
pars$EIRpar$scale = scale*365

F_eir <- with(pars$EIRpar, function(age, bday){
eir/scale*F_season(age+bday)*F_trend(age+bday)*F_age(age)
Expand Down

0 comments on commit 33b8a3e

Please sign in to comment.