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

260

Version

1.0.5

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Stuart Lacy

Last Published

May 4th, 2021

Functions in rprev (1.0.5)

plot.survfit.prev

Plot bootstrapped survival curves.
plot.incdiag

Visualise disease incidence.
extract_covars

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

Simulated patient dataset.
draw_incident_population

Simulates an incident population according to a specific incidence model
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
prevalence

Estimate point prevalence at an index date.
UKmortality

General population survival data.
counted_prevalence

Count prevalence from registry data.
rprev

rprev: Estimate disease point prevalence using a combination of registry data and Monte Carlo simulations.
survfit.prevalence

Form bootstrapped survival curves.
summary.survfit.prev

Obtain N-year survival probability estimates.
test_homogeneity

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

Test simulated prevalence fit.
validate_survival_model

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

Tests custom incidence models
sim_prevalence

Estimate prevalence using Monte Carlo simulation.