Estimating seroprevalence for an infection -- the proportion of individuals with antibodies -- and its variability between subpopulations is a key first step for research and the allocation of resources for treatment and prevention. The relevant raw data is often serological assay measurements that serve as a proxy for antibody level, such as optical density values from enzyme-linked immunosorbent assays (ELISA). Analysis pipelines typically proceed through sequential steps of fitting calibration data independently in each separate batch, transforming assay measurements to antibody levels via each fitted calibration relationship, classifying antibody levels into discrete serostatus by comparison to a threshold, and finally comparing seropositive proportions between subpopulations. Such approaches have numerous limitations including loss of information, overconfidence (discarding uncertainty), and inappropriate choice of threshold. We developed a Bayesian statistical model that replaces the sequential steps of the typical pipeline by multiple levels within a single hierarchical model, treating each sample's antibody level as a model parameter rather than directly observed data. This integrates the connections from the raw assay measurements all the way through to subpopulation variability in seroprevalence, allowing partial pooling of information between related variables and the propagation of uncertainty from each part of the model throughout the whole of the rest of the model. We calculate observation probabilities for all assay measurements from both samples and calibration data, allowing easy identification of outlying calibration or sample measurements. We replace a single hard classification threshold for disease status by continuous probabilities that are adapted to each subpopulation. We allow a flexible multivariate random-effects logistic regression to capture variability in seroprevalence between subpopulations. Using simulated data we found that the typical stepwise approach gave prevalence estimates far from the true values with narrow confidence intervals. Our method, dvsb, had markedly greater accuracy. We report the run time and convergence of dvsb when applied to a real dataset for Lassa fever IgG antibodies measured with ELISA, comprising 72,863 measurements for 21,391 unique samples (results reported elsewhere). dvsb is available at https://github.com/BDI-pathogens/dvsb.