⏳ Running model — please wait…

Bayesian Latent Class Models

Diagnostic test performance & prevalence estimation

Results of the combined diagnostic tests

Double-click any cell in the table above to enter or edit data directly.
How to cite this tool: Tool developed by Alberto Gómez-Buendía (Universidad Complutense de Madrid) and Simon Firestone (University of Melbourne), with coding support from Poppy Schlaadt (Epi-interactive).
Until our paper specific to this tool is available, please cite:
Cheung et al. (2021). Bayesian latent class analysis when there is an imperfect reference test. Rev Sci Tech Off Int Epiz.

We also make use of R, JAGS and the R packages R2jags and mcmcplots. Please check their websites for how to cite their contributions.

Note — WOAH Terrestrial Animal Health Manual (Ch. 1.1.6):
Because Bayesian latent class models are complex and require adherence to critical assumptions, statistical assistance should be sought to help guide the analysis and describe the sampling from the target population(s), the characteristics of other tests included in the analysis, the appropriate choice of model and the estimation methods should be based on peer-reviewed literature.
Read the full chapter →
Prior probabilities


Double-click any cell to adjust either shape parameter for any prior.
Note — Prior misspecification is a critical issue that influences the validity of the inference.
The default Beta(1, 1) priors are flat and ill-advised for most analyses. Because Bayesian latent class models are complex and require adherence to critical assumptions, statistical assistance should be sought to help guide decisions on prior specification and prior sensitivity analyses. Appropriate choices of priors can be based on peer-reviewed literature and expert option.

🔗 Our online Beta-Buster tool helps derive prior Beta distribution shape parameters →

Some general comments on priors are available in our article Cheung et al. (2021). Bayesian latent class analysis when there is an imperfect reference test. Rev Sci Tech Off Int Epiz.
See also the reporting standard (STARD-BLCM) for guidance on assumptions, sensitivity analyses, and the influence of priors on inference.

About mixture priors: If any population may be disease-free, select it above to apply a mixture prior requiring two parameters: PrevX (expected prevalence if diseased) and TauX (prior probability that population X is diseased at all).
Covariance terms
Select which covariance terms to include in your model.
Diseased
Non-Diseased

⚠ Important: If higher-order terms are selected (e.g., All Tests or Tests 1 & 2 & 3) then all nested lower-order terms (e.g., Tests 1 & 2) must also be selected. Selection should reflect biological plausibility, data availability, and convergence. Comparing DICs is an unreliable basis for model selection. A manual forward selection approach is recommended over starting from an over-parameterised model.
Initial values

Double-click any cell to adjust the initial values for either chain.
MCMC settings
Burn-in samples
Iterations
Thinning
Increasing iterations improves mixing but extends runtime.
Model output
After setting all parameters, click Run Model to initialise JAGS and retrieve results.



Model summary

n.eff → should be > 200 Rhat → must be < 1.01
If these requirements are not met, re-run the model with more iterations.

How to cite this tool: Tool developed by Alberto Gómez-Buendía (Universidad Complutense de Madrid) and Simon Firestone (University of Melbourne), with coding support from Poppy Schlaadt (Epi-interactive).
Until our paper specific to this tool is available, please cite:
Cheung et al. (2021). Bayesian latent class analysis when there is an imperfect reference test. Rev Sci Tech Off Int Epiz.

We also make use of R, JAGS and the R packages R2jags and mcmcplots. Please check their websites for how to cite their contributions.

Note — WOAH Terrestrial Animal Health Manual (Ch. 1.1.6):
Because Bayesian latent class models are complex and require adherence to critical assumptions, statistical assistance should be sought to help guide the analysis and describe the sampling from the target population(s), the characteristics of other tests included in the analysis, the appropriate choice of model and the estimation methods should be based on peer-reviewed literature.
Read the full chapter →