RT Journal Article SR Electronic T1 Bayesian analysis of tests with unknown specificity and sensitivity JF medRxiv FD Cold Spring Harbor Laboratory Press SP 2020.05.22.20108944 DO 10.1101/2020.05.22.20108944 A1 Gelman, Andrew A1 Carpenter, Bob YR 2020 UL http://medrxiv.org/content/early/2020/05/26/2020.05.22.20108944.abstract AB When testing for a rare disease, prevalence estimates can be highly sensitive to uncertainty in the specificity and sensitivity of the test. Bayesian inference is a natural way to propagate these uncertainties, with hierarchical modeling capturing variation in these parameters across experiments. Another concern is the people in the sample not being representative of the general population. Statistical adjustment cannot without strong assumptions correct for selection bias in an opt-in sample, but multilevel regression and poststratification can at least adjust for known differences between the sample and the population. We demonstrate these models with code in Stan and discuss their application to a controversial recent study of COVID-19 antibodies in a sample of people from the Stanford University area. Wide posterior intervals make it impossible to evaluate the quantitative claims of that study regarding the number of unreported infections. For future studies, the methods described here should facilitate more accurate estimates of disease prevalence from imperfect tests performed on non-representative samples.Competing Interest StatementThe authors have declared no competing interest.Funding StatementWe thank the National Science Foundation, Office of Naval Research, National Institutes of Health, and Schmidt Foundation for financial support.Author DeclarationsI confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.YesThe details of the IRB/oversight body that provided approval or exemption for the research described are given below:No IRB approval was necessary as this is analysis of already published data.All necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived.YesI understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).YesI have followed all appropriate research reporting guidelines and uploaded the relevant EQUATOR Network research reporting checklist(s) and other pertinent material as supplementary files, if applicable.YesAll data and code for this paper are freely available https://bob-carpenter.github.io/diagnostic-testing/