## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----setup, output=FALSE------------------------------------------------------ library(serosv) ## ----------------------------------------------------------------------------- df <- vzv_be_2001_2003[vzv_be_2001_2003$age < 40.5,] df <- df[order(df$age),] data <- df$VZVmIUml model <- mixture_model(antibody_level = data) model$info ## ----------------------------------------------------------------------------- plot(model) ## ----------------------------------------------------------------------------- est_mixture <- estimate_from_mixture(df$age, data, mixture_model = model, threshold_status = df$seropositive, sp=83, monotonize = FALSE) plot(est_mixture)