You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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 inget_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.The error results because of this line in
transKernel
.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.
The text was updated successfully, but these errors were encountered: