Skip to content

Commit

Permalink
much more reasonable calibration using first exposure model and param…
Browse files Browse the repository at this point in the history
…eterizing c_prop #194
  • Loading branch information
jfree-man committed May 30, 2024
1 parent e7bd15c commit 10bb06f
Show file tree
Hide file tree
Showing 2 changed files with 276 additions and 16 deletions.
3 changes: 2 additions & 1 deletion misc/experiments/macpan-base-fitting/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ mobility_dat = (
)
%>% arrange(date)
# compute 7 day moving average
%>% mutate(across(where(is.numeric),~ rollapply(.x, width = list(-(7:1)), mean, fill = NA)))
%>% mutate(across(where(is.numeric),~ rollapply(.x, width = 7, mean, fill = NA)))
# scale to have pre-pandemic value of 1
%>% mutate(across(where(is.numeric), ~ 1 + (.x/100)))
# compute average of all mobility values
%>% group_by(date)
%>% summarize(mobility_ind = mean(c_across(where(is.numeric)),na.rm = TRUE))
%>% ungroup()
%>% na.omit()
)

saveRDS(clean_tsdata, "./misc/experiments/macpan-base-fitting/clean_tsdata.RDS")
Expand Down
Loading

0 comments on commit 10bb06f

Please sign in to comment.