Bayesian multi-state models for intermittently-observed data. Markov and phase-type semi-Markov models, and misclassification hidden Markov models.
Developer toolsHTML · RGitHub @chjacksonOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Bayesian Multi-State Models for Intermittently-Observed Data
Translation pending
Loading the full README.
Read the full README ↗msmbayes is an R package for Bayesian multi-state modelling of intermittently-observed data.
It is similar to the msm package. It supports the following continuous-time multi-state models:
Markov models
Semi-Markov models using phase-type distributions
Hidden Markov models for misclassified (discrete) state data
The same observation schemes are supported as in msm: intermittent observations, exact transition times, "exact death times" and censored (coarsened) states. Covariates may be time-homogeneous or piecewise-constant.
Any transition structures are permitted for any models (any number of states, with or without cycles, with or without absorbing states).
Models can be fitted with Bayesian, approximate Bayesian or maximum likelihood estimation, via any of the algorithms available in Stan, whereas msm uses only maximum likelihood.
Informative priors can represent background information.
Prior information can also help to stabilise model fitting - avoiding convergence failures.
Semi-Markov models can be fitted, via phase-type approximations to Weibull and Gamma distributions. These are easier to use and much more robust than the "two-phase" methods in msm.
Automatic, efficient uncertainty quantification for any model output.
Bayesian computation in msmbayes is typically more intensive than maximum likelihood estimation in msm, in particular for larger datasets and when using MCMC.
Hidden Markov models with general outcome distributions are not supported. The only HMMs supported are those where the observed state space is the same as (or a subset of) the true state space. This includes misclassification and phase-type models.
Covariates on misclassification probabilities are not supported in misclassification models.
Fixed parameters are not supported. However, parameters can be constrained through their prior distributions. Limited support for equality constraints on covariate effects.
The pci syntax for time-inhomogeneous models is not supported. However, these models can still be specified, by treating time as a covariate, and including censored states at the occasions when the covariate changes but the state is unknown. Prediction functions also currently cannot automatically deal with piecewise-constant covariates.
Multivariate hidden Markov models are not supported.
Examples of using msmbayes are given in: vignette("examples").
Note: Some knowledge of Bayesian analysis is needed to develop and interpret models with this package!
## install,packages("remotes") # if need be
remotes::install_github("chjackson/msmbayes")
If you use it, please give feedback on github issues, or by email.