Discrete Time Markov Chains with R

The markovchain package aims to provide S4 classes and methods to easily handle Discrete Time Markov Chains (DTMCs), filling the gap with what is currently available in the CRAN repository. In this work, I provide an exhaustive description of the main functions included in the package, as well as hands-on examples.

Giorgio Alfredo Spedicato

CRAN packages used

markovchain, clickstream, DTMCPack, MTCM, FuzzyStatProb, depmixS4, HMM, msm, heemod, TPmsm, Rcpp, igraph, matlab, Matrix, expm, method, expm, RcppParallel

CRAN Task Views implied by cited packages

NumericalMathematics, HighPerformanceComputing, Survival, Cluster, Distributions, Econometrics, Finance, gR, Graphics, Multivariate, Optimization, Spatial, TimeSeries


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Spedicato, "The R Journal: Discrete Time Markov Chains with R", The R Journal, 2017

BibTeX citation

  author = {Spedicato, Giorgio Alfredo},
  title = {The R Journal: Discrete Time Markov Chains with R},
  journal = {The R Journal},
  year = {2017},
  note = {https://doi.org/10.32614/RJ-2017-036},
  doi = {10.32614/RJ-2017-036},
  volume = {9},
  issue = {2},
  issn = {2073-4859},
  pages = {84-104}