Skip to content

thomasklausch2/EMmixed

Repository files navigation

EM Mixed: Non-parametric Cumulative Incidence Function estimation for screening data with imperfect tests and baseline prevalence

This package runs an EM algorithm to obtain a non-parametric estimate of cumulative incidence functions (CIF) for the mixed case interval censoring model first published in Witte et al. (2017) which accounts for the imperfectness of the screening test.In addition, this package implements an extension suggested by Klausch et al. (2024) that allows non-parametric estimation with imperfect test sensitivity and partly unobserved prevalence at baseline. For the main functions, see ?np_estimator and ?em_mixed. The package requires an installation of BayesPIM, see https://github.com/thomasklausch2/BayesPIM.

Installation

You can install the development version of EMmixed from GitHub with:

# install.packages("devtools")
devtools::install_github("thomasklausch2/EMmixed", build_vignettes = FALSE)

Example

This is a basic example of prevalence-incidence mixture data generation using BayesPIM, model fitting of the prevalence-incidence mixture CIF, as well as plotting of the estimateagainst the true CIF.

library(EMmixed)

# Generate data according to the Klausch et al. (2024) PIM (function import from BayesPIM)
dat <- gen.dat(kappa = 0.7, n= 1e3, theta = 0.2,
             p = 1, p.discrete = 1,
               beta.X = c(0.2,0.2), beta.W = c(0.2,0.2),
               v.min = 20, v.max = 30, mean.rc = 80,
               sigma.X = 0.2, mu.X=5, dist.X = "weibull",
               prob.r  = 1)

# Run non-parametric estimation
 np_cif = np_estimator(Vobs = dat$Vobs, kappa = 0.7, r = dat$r)

# Make a comparative plot of true CIF and the estimated one
xstar = dat$X.true
xstar[dat$C==1] = 0
plot( ecdf(xstar), xlim=c(0,300), do.points=F)
lines( stepfun( np_cif$tau.mle, c(0,np_cif$F.mle )), col = 2)

References

T. Klausch, B. I. Lissenberg-Witte, and V. M. Coupe (2024). “A Bayesian prevalence-incidence mixture model for screening outcomes with misclassification.” arXiv:2412.16065.

B. I. Witte, J. Berkhof, and M. A. Jonker, “An EM algorithm for nonparametric estimation of the cumulative incidence function from repeated imperfect test results,” , vol. 36, no. 21, pp. 3412–3421, 2017, doi: 10.1002/sim.7373.

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages