Closed spedygiorgio closed 8 years ago
Fixed it.
summary(mchain) Unnamed Markov chain Markov chain that is composed by: Closed classes: 3 4 8 Recurrent classes: {3,4},{8} Transient classes: {1},{2},{5,6,7} The Markov chain is not irreducible The absorbing states are: 8
Seems closed at better analysis. Hope not to reopen :+1:
Dear Giorgio,
spring semester is coming and I am teaching the course on Markov Chains again, and so I decided to take another look at your package. I am impressed how much it has improved since last year!
However, I find the output of summary() now a bit strange, check the following example:
A <- structure(c(0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.3, 0.3, 0, 0, 0, 0, 0, 0.5, 0.7, 0.7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3, 0.4, 0, 0, 0, 0, 0, 0.4, 0, 0.5, 0, 0, 0, 0, 0, 0.6, 0.7, 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 1), .Dim = c(8L, 8L), .Dimnames = list( c("1", "2", "3", "4", "5", "6", "7", "8"), c("1", "2", "3", "4", "5", "6", "7", "8"))) mchain <- new("markovchain", transitionMatrix=A) summary(mchain)
Output:
Class {5,6,7} is listed as both recurrent and transient, which are mutually exclusive by the standard definition (also employed in the vignette). In this case, the class is actually transient (eventually, the chain jumps from state 7 to 8, with 8 being an absorbing state). Is this a bug or have I overlooked something?