Learn R Programming

icmstate

Interval-Censored Multi-STATE modelling (icmstate)

Using the package it is possible to non-parametrically estimate transition intensities in interval-censored multi-state models. The package also provides utilities for plotting panel data and transition probabilities between states. Many of the functions from the package can be used for visualisation as well. The package currently supports two approaches to determine transition intensities, either using the Multinomial likelihood approach as in Gomon and Putter (2024) or the latent Poisson approach as in Gu et al (2023).

Using the package

More information on how to use the package can be found in the vignettes under the doc directory.

Installation

Install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("d-gomon/icmstate")

or the released version from CRAN using:

install.packages("icmstate")

Research Code

The results of Gomon and Putter (2024) can be reproduced using the code in the folder Research_Code.

References

Gomon D., Putter H. (2024): Non-parametric estimation of transition intensities in interval censored Markov multi-state models without loops, arXiv

Gu Y., Zeng D., Heiss G., Lin D. Y. (2023): Maximum likelihood estimation for semiparametric regression models with interval-censored multistate data, Biometrika

Copy Link

Version

Install

install.packages('icmstate')

Monthly Downloads

450

Version

0.2.0

License

GPL (>= 2)

Maintainer

Daniel Gomon

Last Published

July 4th, 2025

Functions in icmstate (0.2.0)

ageqb

Check if event time is larger/equal than other event time
ainB

Check if event time is contained within half-open interval
baseline_intensities_from_coxmod

Recover baseline intensities (in the form of intensity_matrices) from a coxph() fit on multi-state data.
direct_from_observed_intervals

Translate observed transition intervals into direct transition intervals
evalstep

Sample from a markov chain multi state model with exactly observed transition times
estimate_support_msm

Estimate the support of a general Markov interval-censored Multi-state model without loops.
msm_frydman

Determine NPMLE for Multi State illness death Markov model using Frydman (1995)
npmsm

NPMLE for general multi-state model with interval censored transitions
plot.npmsm

Plot a "npmsm" object
existenceNPMLE

Check existence of NPMLE
plot.probtrans.subjects

Plot an object of class "probtrans.subjects"
icmstate-package

icmstate
plot.smoothmsm

Plot a "smoothmsm" object
interpol_msfit

Given a msfit object, linearly interpolate the cumulative hazard taking into account the support sets for msfit objects.
plot_probtrans

Plot the transition probabilities for a fitted npmsm model
get_trans_intervals

Get transition intervals from specified data
print.summary.probtrans.subjects

Print method for a summary.probtrans.subjects object
print.npmsm

Print a "npmsm" object
graphfromIntervals

Construct Graph from censoring/truncation intervals
agreaterb

Check if event time is larger than other event time
expand_covariates_long_data

Expand covariates for a data frame so that covariates can be transition specific.
supportHudgens

Determine the support of the NPMLE for interval censored data.
predict_tp

Calculate subject specific transition probabilities from a multi-state proportional hazards model.
extend_msfit

Given a msfit object, extend the times considered in the object
plot_surv

Plot the transition specific survival probabilities for a fitted npmsm model
probtrans_coxph

sim_id_weib

Simulate panel data from an illness-death model with Weibull transition hazards
sim_weibmsm

Simulate multiple trajectories from an interval-censored multi-state model with Weibull transition intensities
summary.probtrans.subjects

Summary method for a probtrans.subjects object
support_frydman

Find support for Illness-death model. Only applicable to Frydman (1995) setting!!
support_npmsm

Numerically find the support of the transitions from a converged npmsm algorithm
subject_specific_intensity_matrix

Determine subject specific intensity matrix for a single subject
support_from_direct_intervals

Estimate support of multiple transitions given direct transition intervals
visualise_msm

Visualise multi-state data
visualise_data

Visualise data for illness-death model, only applicable to Frydman(1995) setting.
prod_lambda_G_base

Calculate the product of intensities over interval decided by failure times
remove_redundant_observations

Remove redundant observations from supplied data frame
subject_specific_intensity_matrices

Calculate the subject specific intensity matrices
smoothmsm

Smooth hazard estimation for general multi-state model with interval censored transitions
probtrans_weib

Determine transition probabilities for a multi-state model with Weibull hazards for the transitions.
transprob.msm

Wrapper for the probtrans function
trans_specific_risks

Calculate subject specific risks for subjects in newdata
Alargerb

Check if closed interval is contained in half-open infinite interval
EM_solver

EM solver for extended illness-death model (Frydman 1995)
Aintersectb

Check if half-open intervals intersect with event times
AsubsetB

Check if closed interval is contained in other closed interval
binary_search_larger

Binary search - Larger
Estep_smooth

E-step of the EM algorithm for smooth estimation of transition intensities
ChapKolm_fwd_smooth

Chapman-Kolmogorov functions
EM_multinomial

Helper function for npmsm()
ChapKolm_fwd_mat

Function to use
EM_poisson

Helper function for npmsm()
bbase_D

Compute a B-spline basis
bbase_singletime

Compute a B-spline basis for a single time point
Mstep_smooth

Function for fitting proportional hazard model with baseline hazard
binary_search_larger_equal

Binary search - Larger or equal to