Learn R Programming

msm (version 1.8)

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

12,411

Version

1.8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

September 8th, 2024

Functions in msm (1.8)

fev

FEV1 measurements from lung transplant recipients
hmodel2list

Convert a hmodel object to HMM constructor function calls
ecmodel.object

Developer documentation: model for covariates on misclassification probabilities
hmodel.object

Developer documentation: hidden Markov model structure object
hmm-dists

Hidden Markov model constructors
emodel.object

Developer documentation: misclassification model structure object
hazard.msm

Calculate tables of hazard ratios for covariates on transition intensities
hmmMV

Multivariate hidden Markov models
ematrix.msm

Misclassification probability matrix
efpt.msm

Expected first passage time
odds.msm

Calculate tables of odds ratios for covariates on misclassification probabilities
model.frame.msm

Extract original data from msm objects.
msm.form.qoutput

Extract msm model parameter estimates in compact format
logLik.msm

Extract model log-likelihood
lrtest.msm

Likelihood ratio test
medists

Measurement error distributions
msm2Surv

Convert data for `msm' to data for `survival', `mstate' or `flexsurv' analysis
msm-package

Multi-State Markov and Hidden Markov Models in Continuous Time
msm.object

Fitted msm model objects
msm

Multi-state Markov and hidden Markov models in continuous time
plot.msm

Plots of multi-state models
plot.prevalence.msm

Plot of observed and expected prevalences
phasemeans.msm

Parameters of phase-type models in mixture form
paramdata.object

Developer documentation: internal msm parameters object
pmatrix.msm

Transition probability matrix
pmatrix.piecewise.msm

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

Plot empirical and fitted survival curves
plotprog.msm

Kaplan Meier estimates of incidence
pexp

Exponential distribution with piecewise-constant rate
pearson.msm

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

Passage probabilities
qcmodel.object

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

Developer documentation: transition model structure object
print.msm

Print a fitted msm model object
prevalence.msm

Tables of observed and expected prevalences
qmatrix.msm

Transition intensity matrix
pnext.msm

Probability of each state being next
qgeneric

Generic function to find quantiles of a distribution
printold.msm

Print a fitted msm model object
psor

Psoriatic arthritis data
sojourn.msm

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

Estimated ratio of transition intensities
simmulti.msm

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

Simulate from a Markov model fitted using msm
statetable.msm

Table of transitions
scoreresid.msm

Score residuals
sim.msm

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

Tidy the parameter estimates from an msm model
totlos.msm

Total length of stay, or expected number of visits
recreate.olddata

Convert data stored in msm object to old format
tidy.msm.estbystate

Tidy the output of totlos.msm and similar functions
tidy.msm.est

Tidy the output of pmatrix.msm and similar functions
tnorm

Truncated Normal distribution
summary.msm

Summarise a fitted multi-state model
tidy.msm.prevalence

Tidy the output of prevalence.msm
viterbi.msm

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

Update the maximum likelihood estimates in a fitted model object.
surface.msm

Explore the likelihood surface
transient.msm

Transient and absorbing states
twophase

Coxian phase-type distribution with two phases
cav

Heart transplant monitoring data
cmodel.object

Developer documentation: censoring model object
coef.msm

Extract model coefficients
crudeinits.msm

Calculate crude initial values for transition intensities
MatrixExp

Matrix exponential
aneur

Aortic aneurysm progression data
boot.msm

Bootstrap resampling for multi-state models
bos

Bronchiolitis obliterans syndrome after lung transplants
deltamethod

The delta method
draic.msm

Criteria for comparing two multi-state models with nested state spaces