« Video Course: Data Science with Microsoft Azure and R | Main | R's role in science breakthrough: reproducibility of psychology studies »

January 07, 2016

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Two comments:
First Your definition of the canonical form is slightly different from Snell.
Second getRQ(.) produces an error - with P in line with Snell and also with your
definition.

Looks very interesting, but like the previous commenter I get an error message. I assume that in the code above, the line 'getRQ(p)' should be 'getRQ(DWmc)' - but also that only gives an error message.

The function getRQ(P) assumes that the matrix P is in canonical form as specified from by the markovchain package. (Note that this is indeed different from the definition of canonical form used by Snell in chapter 11)

The following code to put DWmc into canonical form was missing from the post.

# Put DWmc into Canonical Form
P <- canonicForm(DWmc)
P

I have corrected this and I do apologize for the error.
Joseph Rickert

Getting Started with Markov Chains using R packages
http://blog.revolutionanalytics.com/2016/01/getting-started-with-markov-chains.html

The comments to this entry are closed.

Search Revolutions Blog




Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Blogtrottr