clusteredMSM 0.1.0

Initial CRAN release

Highlights

Public API

The package exposes a single user-facing function, patp(), with a formula-based interface modelled after survival::Surv():

# One-sample
patp(msm(Tstart, Tstop, Sstart, Sstop) ~ 1,
     data = mydata, tmat = tmat,
     id = "subj_id", cluster = "site",
     h = 1, j = 2, B = 1000, cband = TRUE)

# Two-sample (estimate + test)
patp(msm(Tstart, Tstop, Sstart, Sstop) ~ treatment,
     data = mydata, tmat = tmat,
     id = "subj_id", cluster = "site",
     h = 1, j = 2, B = 1000)

patp() returns an S3 object of class patp with print() and summary() methods.

Input format

Data are supplied in interval format: one row per mutually-exclusive time interval per subject, with columns for interval start time, end time, starting state, and ending state. Censoring is encoded as Sstart == Sstop on the final row. Within each subject, intervals must be temporally and spatially contiguous; this is enforced by strict validation (validate_intervals()).

Known limitations