epinowcast / epinowcast

Tools to enable flexible and efficient hierarchical nowcasting of epidemiological time-series using a semi-mechanistic Bayesian model with support for a range of reporting and generative processes.
https://package.epinowcast.org/
Other
54 stars 20 forks source link

Test coverage for renewal and latent reporting process #174

Open seabbs opened 1 year ago

seabbs commented 1 year ago

152 added both a renewal process and a latent reporting process. Neither of these currently has any test coverage. To some degree this depends and is linked to #173 as the current implementation is so unstable it is hard to test. However, even with this implementation stan level tests are possible.

To check how the current implementation works the example in inst/examples/germany_latent_renewal.R is a good place to start.

Note these changes should target the develop branch.

seabbs commented 1 year ago

This is currently blocked as epinowcast:::expose_stan_fns cannot be used to expose these functions for testing in R. This is because convert_cmdstan_to_rstan cannot currently produce stan code that is valid in rstan due to the use of array vectors. For this reason, I have bumped this issue from our current release timelines.

seabbs commented 1 year ago

192 from @sbfnk enables unit tests for log_expected_obs_from_latent.stan

However expose_stan_fns("log_expected_latent_from_r.stan", "inst/stan/functions") due to issues wit vectoor assignment. This likely also requires a change in syntax processing.