Learn R Programming

rprev

rprev estimates disease prevalence at a specified index date from incomplete registry data. It is designed to be used when estimates of point prevalence from registry data are required, but the registry hasn't been running for sufficiently long to count the number of prevalent cases. Monte Carlo simulation techniques are used to simulate incident cases in years for which incidence data is unavailable, and then estimate survival at the index date.

Prevalence arises from two independent stochastic processes: disease incidence and survival. Default models are provided that model incidence as a homogeneous Poisson process and survival as a standard parameteric distribution, although both of these models can be user specified for further control. See the user_guide vignette for more details about the implementation, and the original publication for details of the algorithm, available at https://pubmed.ncbi.nlm.nih.gov/24656754/.

Installation

To install from CRAN, simply use install.packages('rprev'), while the latest development version can be installed from GitHub using devtools::install_github("stulacy/rprev-dev").

Copy Link

Version

Install

install.packages('rprev')

Monthly Downloads

313

Version

1.0.6

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Stuart Lacy

Last Published

June 27th, 2025

Functions in rprev (1.0.6)

summary.survfit.prev

Obtain N-year survival probability estimates.
test_prevalence_fit

Test simulated prevalence fit.
sim_prevalence

Estimate prevalence using Monte Carlo simulation.
rprev-package

rprev: Estimating Disease Prevalence from Registry Data
survfit.prevalence

Form bootstrapped survival curves.
predict_survival_probability

Predicts survival probability for given individuals at specific times.
fixed_cure

Builds survival models for diseases with cured fractions using population mortality tables
extract_covars

Returns the name of the covariates in the registry data set that are required by the survival model.
UKmortality

General population survival data.
draw_incident_population

Simulates an incident population according to a specific incidence model
plot.incdiag

Visualise disease incidence.
prevalence

Estimate point prevalence at an index date.
plot.survfit.prev

Plot bootstrapped survival curves.
counted_prevalence

Count prevalence from registry data.
test_homogeneity

Inspects disease incidence for its compatibility with a homogeneous Poisson process.
validate_incidence_model

Tests custom incidence models
validate_survival_model

Tests that a custom survival object has the required attributes for use in the prevalence function.
prevsim

Simulated patient dataset.