library(kableExtra) library(coda)
This is an overview of an R package I am currently developing as part of a research paper looking into virus dynamics in bat populations of Australia.
The link to the github repo is: https://github.com/aaronm70/batMods, which contains all code and associated data.
batMods fits a number of discrete time stochastic models of varying structures with and without seasonal forces, to observed bat virus data (currently from boonah australia [@field2015spatiotemporal]), using particle MCMC based methods. The goal is to identify which dynamical model best represents the observed viral samples from wild populations and gain further insight into between-host viral dynamics in bats. Model comparison is conducted using an approximate leave one out cross validation algorithm, incorporating Pareto smoothed importance sampling [@VehtariLooPackage]. This algorithm uses pointwise likelihood values to compute the log pointwise predictive density and its Monte Carlo standard error, the effective number of parameters, Pareto k diagnostic values (which can help assess if a model is well specified) and an information criterion "looic" (lower values suggest a better model fit). [@vehtari2017practical;@vehtari2015pareto;@AkiLoo].
knitr::include_graphics("/Users/alm204/OneDrive/Cambridge/Projects/model_comparisons/figures/adultMod-Paper.png")
Currently batMods fits three primary models structures with and without maternal immmunity and seasonal forces (figure 1) to multiple data-types, including serology and PCR data.
The analysis can be run from the runscript.R file.
The metropilis hastings and particle filter algorithms run in R, whilst the model itself runs in C code, which is implemented via the Odin package.
The model and fitting methods are described in modelMethods.pdf https://github.com/aaronm70/batMods/blob/master/modelMethods.pdf
This is a work in progress as part of a paper on bat virus dynamics, as such should not be seen as a final analysis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.