Package: msm 1.8.2

Christopher Jackson

msm: Multi-State Markov and Hidden Markov Models in Continuous Time

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.

Authors:Christopher Jackson [aut, cre]

msm_1.8.2.tar.gz
msm_1.8.2.tar.gz(r-4.5-noble)msm_1.8.2.tar.gz(r-4.4-noble)
msm_1.8.2.tgz(r-4.4-emscripten)msm_1.8.2.tgz(r-4.3-emscripten)
msm.pdf |msm.html
msm/json (API)
NEWS

# Install 'msm' in R:
install.packages('msm', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/chjackson/msm/issues

Uses libs:
  • openblas– Optimized BLAS
Datasets:
  • aneur - Aortic aneurysm progression data
  • bos - Bronchiolitis obliterans syndrome after lung transplants
  • bos3 - Bronchiolitis obliterans syndrome after lung transplants
  • bos4 - Bronchiolitis obliterans syndrome after lung transplants
  • cav - Heart transplant monitoring data
  • fev - FEV1 measurements from lung transplant recipients
  • psor - Psoriatic arthritis data

9.70 score 125 packages 1.5k scripts 22k downloads 69 mentions 85 exports 17 dependencies

Last updated 18 days agofrom:90a8cfa051. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 08 2024
R-4.5-linux-x86_64OKNov 08 2024

Exports:absorbing.msmboot.msmcoef.msmcrudeinits.msmd2phasedeltamethoddmenormdmeunifdpexpdraic.msmdrlcv.msmdtnormefpt.msmematrix.msmenvisits.msmh2phasehazard.msmhmmBetahmmBetaBinomhmmBinomhmmCathmmExphmmGammahmmIdenthmmLNormhmmMETNormhmmMEUnifhmmMVhmmNBinomhmmNormhmmPoishmmThmmTNormhmmUnifhmmWeibullhmodel2listlogLik.msmlrtest.msmMatrixExpmsmmsm.form.eoutputmsm.form.qoutputmsm2Survodds.msmp2phasepearson.msmphasemeans.msmplot.prevalence.msmplot.survfit.msmplotprog.msmpmatrix.msmpmatrix.piecewise.msmpmenormpmeunifpnext.msmppass.msmppexpprevalence.msmprintnew.msmprintold.msmptnormq2phaseqgenericqmatrix.msmqmenormqmeunifqpexpqratio.msmqtnormr2phasermenormrmeunifrpexprtnormscoreresid.msmsim.msmsimfitted.msmsimmulti.msmsojourn.msmstatetable.msmsurface.msmtotlos.msmtransient.msmupdatepars.msmviterbi.msm

Dependencies:cliexpmfansigenericsgluelatticelifecyclemagrittrMatrixmvtnormpillarpkgconfigrlangsurvivaltibbleutf8vctrs

User guide to msm with worked examples

Rendered frommsm-manual.Rnwusingutils::Sweaveon Nov 08 2024.

Last update: 2023-11-24
Started: 2016-10-04

Readme and manuals

Help Manual

Help pageTopics
Multi-State Markov and Hidden Markov Models in Continuous Timemsm-package
Aortic aneurysm progression dataaneur
Bootstrap resampling for multi-state modelsboot.msm
Bronchiolitis obliterans syndrome after lung transplantsbos bos3 bos4
Heart transplant monitoring datacav
Developer documentation: censoring model objectcmodel.object
Extract model coefficientscoef.msm
Calculate crude initial values for transition intensitiescrudeinits.msm
The delta methoddeltamethod
Criteria for comparing two multi-state models with nested state spacesdraic.msm drlcv.msm
Developer documentation: model for covariates on misclassification probabilitiesecmodel.object
Expected first passage timeefpt.msm
Misclassification probability matrixematrix.msm
Developer documentation: misclassification model structure objectemodel.object
FEV1 measurements from lung transplant recipientsfev
Calculate tables of hazard ratios for covariates on transition intensitieshazard.msm
Hidden Markov model constructorshmm-dists hmmBeta hmmBetaBinom hmmBinom hmmCat hmmExp hmmGamma hmmIdent hmmLNorm hmmMETNorm hmmMEUnif hmmNBinom hmmNorm hmmPois hmmT hmmTNorm hmmUnif hmmWeibull
Multivariate hidden Markov modelshmmMV
Developer documentation: hidden Markov model structure objecthmodel.object
Convert a hmodel object to HMM constructor function callshmodel2list
Extract model log-likelihoodlogLik.msm
Likelihood ratio testlrtest.msm
Matrix exponentialMatrixExp
Measurement error distributionsdmenorm dmeunif medists pmenorm pmeunif qmenorm qmeunif rmenorm rmeunif
Extract original data from 'msm' objects.model.frame.msm model.matrix.msm
Multi-state Markov and hidden Markov models in continuous timemsm
Extract msm model parameter estimates in compact formatmsm.form.eoutput msm.form.qoutput
Fitted msm model objectsmsm.object
Convert data for `msm' to data for `survival', `mstate' or `flexsurv' analysismsm2Surv
Calculate tables of odds ratios for covariates on misclassification probabilitiesodds.msm
Developer documentation: internal msm parameters objectparamdata.object
Pearson-type goodness-of-fit testpearson.msm
Exponential distribution with piecewise-constant ratedpexp pexp ppexp qpexp rpexp
Parameters of phase-type models in mixture formphasemeans.msm
Plots of multi-state modelsplot.msm
Plot of observed and expected prevalencesplot.prevalence.msm
Plot empirical and fitted survival curvesplot.survfit.msm
Kaplan Meier estimates of incidenceplotprog.msm
Transition probability matrixpmatrix.msm
Transition probability matrix for processes with piecewise-constant intensitiespmatrix.piecewise.msm
Probability of each state being nextpnext.msm
Passage probabilitiesppass.msm
Tables of observed and expected prevalencesprevalence.msm
Print a fitted msm model objectprint.msm printnew.msm
Print a fitted msm model objectprintold.msm
Psoriatic arthritis datapsor
Developer documentation: model for covariates on transition intensitiesqcmodel.object
Generic function to find quantiles of a distributionqgeneric
Transition intensity matrixqmatrix.msm
Developer documentation: transition model structure objectqmodel.object
Estimated ratio of transition intensitiesqratio.msm
Convert data stored in msm object to old formatrecreate.olddata
Score residualsscoreresid.msm
Simulate one individual trajectory from a continuous-time Markov modelsim.msm
Simulate from a Markov model fitted using msmsimfitted.msm
Simulate multiple trajectories from a multi-state Markov model with arbitrary observation timessimmulti.msm
Mean sojourn times from a multi-state modelsojourn.msm
Table of transitionsstatetable.msm
Summarise a fitted multi-state modelprint.summary.msm summary.msm
Explore the likelihood surfacecontour.msm image.msm persp.msm surface.msm
Tidy the parameter estimates from an msm modeltidy.msm
Tidy the output of pmatrix.msm and similar functionstidy.msm.est
Tidy the output of totlos.msm and similar functionstidy.msm.estbystate
Tidy the output of prevalence.msmtidy.msm.prevalence
Truncated Normal distributiondtnorm ptnorm qtnorm rtnorm tnorm
Total length of stay, or expected number of visitsenvisits.msm totlos.msm
Transient and absorbing statesabsorbing.msm transient.msm
Coxian phase-type distribution with two phasesd2phase h2phase p2phase q2phase r2phase twophase
Update the maximum likelihood estimates in a fitted model object.updatepars.msm
Calculate the probabilities of underlying states and the most likely path through themviterbi.msm