Skip to content

martwalker/trueprev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loading required packages

This repository contains the R code (1) and associated data for the Bayesian statistical model described in Díaz et al. (2) to estimate prevalence from apparent prevalence measured by two independent diagnostics (Kato Katz, KK and Miracidial Hatching Test, MHT). The model requires installation of the rjags (3) and coda (4) packages.

library(rjags)
library(coda)

Loading the data, defining & running the model

JAGS requires the raw data to be formatted in a list which can be loaded as follows:

datls <- readRDS("jagsdat.rds")

The statistical model is specified in an R script which writes a suitable .txt file to the directory:

source("jagsmod.R")

The model is then run within the R environment using:

source("runmod.R")

Summary data

The summary statistics of the estimated posterior distributions are loaded as follows:

sumdat <- readRDS("prev.rds")

References

1. R Core Team. R: A language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing (2021). https://www.R-project.org/

2. Díaz AV, Lambert S, M. Inês Neve an AB, Léger E, Diouf ND, Sène M, Webster JP, Walker M. Modelling livestock test-and-treat: A novel one health strategy to control schistosomiasis and mitigate against drug resistance. Front Trop Dis (2022) in press:

3. Plummer M. Rjags: Bayesian graphical models using MCMC. (2021). https://CRAN.R-project.org/package=rjags

4. Plummer M, Best N, Cowles K, Vines K. CODA: Convergence diagnosis and output analysis for MCMC. R News (2006) 6:7–11. https://journal.r-project.org/archive/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages