Package: markovchain 0.10.0

Giorgio Alfredo Spedicato

markovchain: Easy Handling Discrete Time Markov Chains

Functions and S4 methods to create and manage discrete time Markov chains more easily. In addition functions to perform statistical (fitting and drawing random variates) and probabilistic (analysis of their structural proprieties) analysis are provided. See Spedicato (2017) <doi:10.32614/RJ-2017-036>. Some functions for continuous times Markov chains depend on the suggested ctmcd package.

Authors:Giorgio Alfredo Spedicato [aut, cre], Tae Seung Kang [aut], Sai Bhargav Yalamanchi [aut], Mildenberger Thoralf [ctb], Deepak Yadav [aut], Ignacio Cordón [aut], Vandit Jain [ctb], Toni Giorgino [ctb], Richèl J.C. Bilderbeek [ctb], Daniel Ebbert [ctb], Shreyash Maheshwari [ctb], Reinhold Koch [ctb]

markovchain_0.10.0.tar.gz
markovchain_0.10.0.tar.gz(r-4.5-noble)markovchain_0.10.0.tar.gz(r-4.4-noble)
markovchain.pdf |markovchain.html
markovchain/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/spedygiorgio/markovchain/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • blanden - Mobility between income quartiles
  • craigsendi - CD4 cells counts on HIV Infects between zero and six month
  • holson - Holson data set
  • kullback - Example from Kullback and Kupperman Tests for Contingency Tables
  • preproglucacon - Preprogluccacon DNA protein bases sequences
  • rain - Alofi island daily rainfall
  • sales - Sales Demand Sequences
  • tm_abs - Single Year Corporate Credit Rating Transititions

openblascpp

8.50 score 3 stars 4 packages 708 scripts 9.2k downloads 9 mentions 65 exports 15 dependencies

Last updated 12 days agofrom:fa433b6183. Checks:OK: 1 WARNING: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 25 2024
R-4.5-linux-x86_64WARNINGNov 25 2024

Exports:absorbingStatesabsorptionProbabilitiesassessOrderassessStationaritycanonicFormcoercecommittorABcommunicatingClassesconditionalDistributioncreateSequenceMatrixctmcFitexpectedRewardsexpectedRewardsBeforeHittingAExpectedTimefirstPassagefirstPassageMultiplefitHigherOrderfitHighOrderMultivarMCfreq2GeneratorgeneratorToTransitionMatrixhittingProbabilitiesimpreciseProbabilityatTinferHyperparamis.accessibleis.CTMCirreducibleis.irreducibleis.regularis.TimeReversiblemarkovchainFitmarkovchainListFitmarkovchainSequencemeanAbsorptionTimemeanFirstPassageTimemeanNumVisitsmeanRecurrenceTimemultinomialConfidenceIntervalsnamename<-noofVisitsDistperiodplotpredictpredictHommcpredictiveDistributionprintpriorDistributionprobabilityatTrctmcrecurrentClassesrecurrentStatesrmarkovchainseq2freqProbseq2matHighshowstatessteadyStatessummaryttransientClassestransientStatestransition2GeneratortransitionProbabilityverifyEmpiricalToTheoreticalverifyHomogeneityverifyMarkovProperty

Dependencies:clicpp11expmglueigraphlatticelifecyclemagrittrMatrixpkgconfigRcppRcppArmadilloRcppParallelrlangvctrs

The markovchain Package: A Package for Easily Handling Discrete Markov Chains in R

Rendered froman_introduction_to_markovchain_package.Rmdusingknitr::rmarkdownon Nov 25 2024.

Last update: 2024-11-14
Started: 2019-01-21

Google Summer of Code 2017 Additions

Rendered fromgsoc_2017_additions.Rmdusingknitr::rmarkdownon Nov 25 2024.

Last update: 2024-11-14
Started: 2019-07-22

Higher order Markov chains

Rendered fromhigher_order_markov_chains.Rmdusingknitr::rmarkdownon Nov 25 2024.

Last update: 2024-11-14
Started: 2019-01-21

Readme and manuals

Help Manual

Help pageTopics
Easy Handling Discrete Time Markov Chainsmarkovchain-package markovchain
Absorption probabilitiesabsorptionProbabilities
Mobility between income quartilesblanden
Calculates committor of a markovchain object with respect to set A, BcommittorAB
'conditionalDistribution' of a Markov ChainconditionalDistribution
CD4 cells counts on HIV Infects between zero and six monthcraigsendi
Function to fit a discrete Markov chaincreateSequenceMatrix markovchainFit
Continuous time Markov Chains classctmc-class dim,ctmc-method initialize,ctmc_method plot,ctmc,missing-method states,ctmc-method steadyStates,ctmc-method
Function to fit a CTMCctmcFit
Expected Rewards for a markovchainexpectedRewards
Expected first passage Rewards for a set of states in a markovchainexpectedRewardsBeforeHittingA
Returns expected hitting time from state i to state jExpectedTime
First passage across statesfirstPassage
function to calculate first passage probabilitiesfirstPassageMultiple
Functions to fit a higher order Markov chainfitHigherOrder seq2freqProb seq2matHigh
Function to fit Higher Order Multivariate Markov chainfitHighOrderMultivarMC
Returns a generator matrix corresponding to frequency matrixfreq2Generator
Function to obtain the transition matrix from the generatorgeneratorToTransitionMatrix
Higher order Markov Chains classHigherOrderMarkovChain-class
Hitting probabilities for markovchainhittingProbabilities
Holson data setholson
An S4 class for representing High Order Multivariate Markovchain (HOMMC)hommc hommc-class
An S4 class for representing Imprecise Continuous Time Markovchainsictmc ictmc-class
Calculating full conditional probability using lower rate transition matriximpreciseProbabilityatT
Function to infer the hyperparameters for Bayesian inference from an a priori matrix or a data setinferHyperparam
Verify if a state j is reachable from state i.is.accessible
Check if CTMC is irreducibleis.CTMCirreducible
Function to check if a Markov chain is irreducible (i.e. ergodic)is.irreducible
Check if a DTMC is regularis.regular
checks if ctmc object is time reversibleis.TimeReversible
Example from Kullback and Kupperman Tests for Contingency Tableskullback
Markov Chain class!=,markovchain,markovchain-method *,markovchain,markovchain-method *,markovchain,matrix-method *,markovchain,numeric-method *,matrix,markovchain-method *,numeric,markovchain-method ==,markovchain,markovchain-method absorbingStates,markovchain-method absorptionProbabilities,markovchain-method canonicForm,markovchain-method coerce,data.frame,markovchain-method coerce,etm,markovchain-method coerce,markovchain,data.frame-method coerce,markovchain,igraph-method coerce,markovchain,matrix-method coerce,markovchain,sparseMatrix-method coerce,Matrix,markovchain-method coerce,matrix,markovchain-method coerce,msm,markovchain-method coerce,msm.est,markovchain-method coerce,sparseMatrix,markovchain-method coerce,table,markovchain-method communicatingClasses,markovchain-method conditionalDistribution,markovchain-method dim,markovchain-method hittingProbabilities,markovchain-method initialize,markovchain-method is.accessible,markovchain,character,character-method is.accessible,markovchain,missing,missing-method is.irreducible,markovchain-method is.regular,markovchain-method markovchain-class meanAbsorptionTime,markovchain-method meanFirstPassageTime,markovchain,character-method meanFirstPassageTime,markovchain,missing-method meanNumVisits,markovchain-method meanRecurrenceTime,markovchain-method names<-,markovchain-method plot,markovchain,missing-method predict,markovchain-method print,markovchain-method recurrentClasses,markovchain-method recurrentStates,markovchain-method show,markovchain-method sort,markovchain-method steadyStates,markovchain-method summary,markovchain-method t,markovchain-method transientClasses,markovchain-method transientStates,markovchain-method [,markovchain,ANY,ANY,ANY-method ^,markovchain,numeric-method
Non homogeneus discrete time Markov Chains classdim,markovchainList-method markovchainList-class predict,markovchainList-method print,markovchainList-method show,markovchainList-method [[,markovchainList-method
markovchainListFitmarkovchainListFit
Function to generate a sequence of states from homogeneous Markov chains.markovchainSequence
Mean absorption timemeanAbsorptionTime
Mean First Passage Time for irreducible Markov chainsmeanFirstPassageTime
Mean num of visits for markovchain, starting at each statemeanNumVisits
Mean recurrence timemeanRecurrenceTime
A function to compute multinomial confidence intervals of DTMCmultinomialConfidenceIntervals
Method to retrieve name of markovchain objectname name,markovchain-method
Method to set name of markovchain objectname<- name<-,markovchain-method
Returns the states for a Markov chain objectnames,markovchain-method
return a joint pdf of the number of visits to the various states of the DTMCnoofVisitsDist
Returns an Identity matrixones
Various function to perform structural analysis of DTMCabsorbingStates canonicForm communicatingClasses period recurrentClasses recurrentStates transientClasses transientStates
Simulate a higher order multivariate markovchainpredictHommc
predictiveDistributionpredictiveDistribution
Preprogluccacon DNA protein bases sequencespreproglucacon
priorDistributionpriorDistribution
Calculating probability from a ctmc objectprobabilityatT
Alofi island daily rainfallrain
rctmcrctmc
Function to generate a sequence of states from homogeneous or non-homogeneous Markov chains.rmarkovchain
Sales Demand Sequencessales
Function to display the details of hommc objectshow,hommc-method
Defined states of a transition matrixstates states,markovchain-method
Stationary states of a 'markovchain' objectsteadyStates
Single Year Corporate Credit Rating Transititionstm_abs
Return the generator matrix for a corresponding transition matrixtransition2Generator
Function to get the transition probabilities from initial to subsequent states.transitionProbability transitionProbability,markovchain-method
Various functions to perform statistical inference of DTMCassessOrder assessStationarity verifyEmpiricalToTheoretical verifyHomogeneity verifyMarkovProperty
Matrix to create zeroszeros