Learn R Programming

msm (version 1.8.1)

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

22,402

Version

1.8.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

October 4th, 2024

Functions in msm (1.8.1)

hmodel.object

Developer documentation: hidden Markov model structure object
fev

FEV1 measurements from lung transplant recipients
ecmodel.object

Developer documentation: model for covariates on misclassification probabilities
hmm-dists

Hidden Markov model constructors
hmodel2list

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

Developer documentation: misclassification model structure object
ematrix.msm

Misclassification probability matrix
hazard.msm

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

Expected first passage time
hmmMV

Multivariate hidden Markov models
msm.form.qoutput

Extract msm model parameter estimates in compact format
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
medists

Measurement error distributions
lrtest.msm

Likelihood ratio test
msm

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

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

Extract model log-likelihood
model.frame.msm

Extract original data from msm objects.
paramdata.object

Developer documentation: internal msm parameters object
plotprog.msm

Kaplan Meier estimates of incidence
plot.prevalence.msm

Plot of observed and expected prevalences
pexp

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

Plot empirical and fitted survival curves
phasemeans.msm

Parameters of phase-type models in mixture form
plot.msm

Plots of multi-state models
pmatrix.piecewise.msm

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

Transition probability matrix
pearson.msm

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

Print a fitted msm model object
qcmodel.object

Developer documentation: model for covariates on transition intensities
pnext.msm

Probability of each state being next
qgeneric

Generic function to find quantiles of a distribution
qmodel.object

Developer documentation: transition model structure object
qmatrix.msm

Transition intensity matrix
ppass.msm

Passage probabilities
psor

Psoriatic arthritis data
recreate.olddata

Convert data stored in msm object to old format
summary.msm

Summarise a fitted multi-state model
printold.msm

Print a fitted msm model object
statetable.msm

Table of transitions
simfitted.msm

Simulate from a Markov model fitted using msm
sojourn.msm

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

Estimated ratio of transition intensities
prevalence.msm

Tables of observed and expected prevalences
simmulti.msm

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

Explore the likelihood surface
tidy.msm

Tidy the parameter estimates from an msm model
tidy.msm.est

Tidy the output of pmatrix.msm and similar functions
tidy.msm.estbystate

Tidy the output of totlos.msm and similar functions
tnorm

Truncated Normal distribution
tidy.msm.prevalence

Tidy the output of prevalence.msm
transient.msm

Transient and absorbing states
scoreresid.msm

Score residuals
sim.msm

Simulate one individual trajectory from a continuous-time Markov model
twophase

Coxian phase-type distribution with two phases
totlos.msm

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

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

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

Criteria for comparing two multi-state models with nested state spaces
cmodel.object

Developer documentation: censoring model object
coef.msm

Extract model coefficients
deltamethod

The delta method
MatrixExp

Matrix exponential
boot.msm

Bootstrap resampling for multi-state models
aneur

Aortic aneurysm progression data
cav

Heart transplant monitoring data
crudeinits.msm

Calculate crude initial values for transition intensities
bos

Bronchiolitis obliterans syndrome after lung transplants