Learn R Programming

⚠️There's a newer version (1.8.1) of this package.Take me there.

msm (version 1.7)

Multi-State Markov and Hidden Markov Models in Continuous Time

Description

Functions for fitting continuous-time Markov and hidden Markov multi-state models to longitudinal data. Designed for processes observed at arbitrary times in continuous time (panel data) but some other observation schemes are supported. Both Markov transition rates and the hidden Markov output process can be modelled in terms of covariates, which may be constant or piecewise-constant in time.

Copy Link

Version

Install

install.packages('msm')

Monthly Downloads

19,748

Version

1.7

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Christopher Jackson

Last Published

November 28th, 2022

Functions in msm (1.7)

2phase

Coxian phase-type distribution with two phases
cmodel.object

Developer documentation: censoring model object
deltamethod

The delta method
boot.msm

Bootstrap resampling for multi-state models
MatrixExp

Matrix exponential
bos

Bronchiolitis obliterans syndrome after lung transplants
coef.msm

Extract model coefficients
aneur

Aortic aneurysm progression data
crudeinits.msm

Calculate crude initial values for transition intensities
cav

Heart transplant monitoring data
fev

FEV1 measurements from lung transplant recipients
ematrix.msm

Misclassification probability matrix
hmodel.object

Developer documentation: hidden Markov model structure object
emodel.object

Developer documentation: misclassification model structure object
ecmodel.object

Developer documentation: model for covariates on misclassification probabilities
draic.msm

Criteria for comparing two multi-state models with nested state spaces
hazard.msm

Calculate tables of hazard ratios for covariates on transition intensities
efpt.msm

Expected first passage time
hmm-dists

Hidden Markov model constructors
hmmMV

Multivariate hidden Markov models
logLik.msm

Extract model log-likelihood
msm2Surv

Convert data for `msm' to data for `survival', `mstate' or `flexsurv' analysis
msm.form.qoutput

Extract msm model parameter estimates in compact format
msm.object

Fitted msm model objects
medists

Measurement error distributions
model.frame.msm

Extract original data from msm objects.
msm

Multi-state Markov and hidden Markov models in continuous time
paramdata.object

Developer documentation: internal msm parameters object
lrtest.msm

Likelihood ratio test
odds.msm

Calculate tables of odds ratios for covariates on misclassification probabilities
pmatrix.piecewise.msm

Transition probability matrix for processes with piecewise-constant intensities
plot.prevalence.msm

Plot of observed and expected prevalences
pnext.msm

Probability of each state being next
pmatrix.msm

Transition probability matrix
plot.msm

Plots of multi-state models
plotprog.msm

Kaplan Meier estimates of incidence
pearson.msm

Pearson-type goodness-of-fit test
phasemeans.msm

Parameters of phase-type models in mixture form
pexp

Exponential distribution with piecewise-constant rate
plot.survfit.msm

Plot empirical and fitted survival curves
ppass.msm

Passage probabilities
qcmodel.object

Developer documentation: model for covariates on transition intensities
qmodel.object

Developer documentation: transition model structure object
qmatrix.msm

Transition intensity matrix
print.msm

Print a fitted msm model object
qratio.msm

Estimated ratio of transition intensities
printold.msm

Print a fitted msm model object
prevalence.msm

Tables of observed and expected prevalences
qgeneric

Generic function to find quantiles of a distribution
psor

Psoriatic arthritis data
recreate.olddata

Convert data stored in msm object to old format
tnorm

Truncated Normal distribution
sim.msm

Simulate one individual trajectory from a continuous-time Markov model
statetable.msm

Table of transitions
surface.msm

Explore the likelihood surface
simfitted.msm

Simulate from a Markov model fitted using msm
sojourn.msm

Mean sojourn times from a multi-state model
updatepars.msm

updatepars.msm
simmulti.msm

Simulate multiple trajectories from a multi-state Markov model with arbitrary observation times
viterbi.msm

Calculate the probabilities of underlying states and the most likely path through them
msm.summary

Summarise a fitted multi-state model
totlos.msm

Total length of stay, or expected number of visits
scoreresid.msm

Score residuals
transient.msm

Transient and absorbing states