Skip to content

modMStates

0.0.1Package record

Simulation and Estimation of Continuous-Time Multi-State Markov Models for Panel Data

0packages depend
432downloads / year
79.7%test coverage
13/13flavors OK

Overview

About

A higher-level interface to continuous-time Markov multi-state models for panel (interval-censored) data. Seven canonical clinical process structures are supplied with structurally valid generator matrices, so that transition matrices and starting values need not be constructed by hand. Panel data can be simulated from exact trajectories under regular or irregular observation schedules, with optional exactly observed absorption times and optional Weibull holding times for assessing the Markov assumption. A single fitting call validates the input against the assumed structure and returns the estimated generator with confidence intervals, mean sojourn times, transition probability matrices and observed transition counts, together with the optimiser's convergence code. A Monte Carlo driver reports Monte Carlo standard errors alongside bias, root mean squared error and interval coverage. Likelihood evaluation is delegated to 'msm' (Jackson, 2011, doi:10.18637/jss.v038.i08); the panel-data likelihood is that of Kalbfleisch and Lawless (1985) doi:10.1080/01621459.1985.10478195.

Changes in 0.0.1

Initial release of the reorganised package.

  • Trajectories are generated exactly and the panel record is formed by evaluating the trajectory at the observation times, keeping trajectory generation and panel construction separate.
  • sim_mspdata() supports irregular, subject-specific visit schedules, random missed visits, exactly observed absorption times, and Weibull (semi-Markov) holding times for assessing the Markov assumption.
  • fit_msm() replaces fit.msm(), whose name collided with S3 dispatch on objects of class msm. fit.msm() and sim.mspdata() remain as deprecated aliases.
  • fit_msm() validates state coding, duplicate visit times and observed transitions against the assumed structure before calling the optimiser, supports deathexact for exactly observed absorption, and reports the optimiser's convergence code.
Show all changes in 0.0.1Hide the rest of the changes in 0.0.1
  • ms_montecarlo() reports Monte Carlo standard errors alongside bias, RMSE and coverage, and counts non-convergence from the optimiser code rather than from the absence of an error.
  • fit_msm() recovers from the numerical overflow that msm can hit in large samples by refitting with a rescaled objective, and records this in the rescaled element. The retry runs only after an unscaled attempt has failed, so ordinary fits are unchanged.
  • Licence changed to GPL-3 for compatibility with msm.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OKNow
  • OK7 OK2026-09-04
Advisories

none known

Documentation

In release 0.0.1
READMENoVignettesNoNEWSYes · 67% structured · mentions 0.0.1Citation fileNo
Description cites a JSS article
Help pages
8
Examples that run
88%7 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
96%
Return-value docs
100%
Help pages citing references
13%

Downloads

432
CRAN downloads in the past year
Rank #25,009 · ~1/day · ~36/mo
Daily download trend is not available in this view yet.
24230 days
43290 days
4321 year
Compare downloads with other packages →
Also on6 r2u2 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-03-30 · Default branch at 0.1.0, ahead of CRAN 0.0.1 (checked 2026-10-22)
Responsiveness
not measured
PracticesBeta

2 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/infinitebstats/modmstates on 2026-10-22.

Reproducibility and dev environment (1)
renv
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
2 external dependencies (excludes base and recommended)

Installing modMStates adds 14 packages (10 with compiled code, 6.2 MB of source tarballs). Heaviest: mvtnorm 1.0 MB, vctrs 1.0 MB, msm 972 KB.

Depends (1)
R >= 3.5.0
Imports (3)
msmstatsutils
LinkingTo (0)
none
Suggests (2)
testthatsurvival
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (2)
Author, Maintainer since 0.0.1 (2026), Contributor
Author, Contributor
Releases (1)
  • 0.0.1Latest
    2026-09-03 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-09-03
Total releases
1 / 1 yrs
License
GPL-3 OSI
Minimum R
≥ 3.5.0
Download size
21 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("modMStates")
Bhattacharjee, A., & Pawar, A. (2026). modMStates: Simulation and Estimation of Continuous-Time Multi-State Markov Models for Panel Data (Version 0.0.1) [Computer software]. https://doi.org/10.32614/CRAN.package.modMStates

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for modMStates version 0.0.1 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy