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

Concern about R0 calculation for vaxified models #232

Open
stevencarlislewalker opened this issue Aug 16, 2022 · 0 comments
Open

Concern about R0 calculation for vaxified models #232

stevencarlislewalker opened this issue Aug 16, 2022 · 0 comments

Comments

@stevencarlislewalker
Copy link
Collaborator

Context

I'm building R0 functionality in the TMB engine and have been doing sanity checks by comparing the results using the TMB engine with those using the R engine. In making these comparisons I've found some issues that I will report here, but I have not yet spent the required time to do a proper bug report.

Details

The get_R0 function allows for two methods: analytical and kernel. The default is analytical and there is a comment in get_R0 that this analytical method will need to be reconsidered for structured models. This suggests to me that R0 for structured models (e.g. vaxified models) may not be correct. If they are indeed incorrect then there should be an error or at least a warning, which there is not. On the other hand, selecting the kernel method (which I believe to be more general and therefore potentially valid for vaxified models) generates this error for vaxified models.

> get_R0(params, method = "kernel")
Error in make_beta(state, params) : 
  if params are vaxified, state also needs to be vaxified

The error results because of this line in transKernel.

state <- make_state(N = 1, E0 = 1, use_eigvec = FALSE)

This state vector is passed to the simulation for producing the kernel. However, this state variable assumes the base unstructured model so if you pass a vaxified parameter vector you get a mismatch.

If I try to fix this issue by making state with explicit vaxification, I get this.

> make_state(N = 1, E0 = 1, use_eigvec = FALSE, vaxify = TRUE)
Error in `build_longer_spec()`:
! `cols` must select at least one column.
Run `rlang::last_error()` to see where the error occurred.
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

1 participant