0
$\begingroup$

I am trying to run a Markov process. I came across this webpage, which details a simple case of Markov process in R and python. While all the details are clear to me including 1) genotype of the children from given diploid parental cross 2) presentation of this parent-child genotype as matrix 3) preparation of this relation as a matrix. But, I am not following on what is being plotted on the graph. I am mainly confused by this statement that the author makes,"For example, we want to know the probabilities for the current state for the next 20 steps when you started in S3."

Are the parents producing two children and these children are producing another two children for 20 steps?? I know this might be a very comprehensive explanation, but can someone explain in more detail. And how the plot is related to this statement?

$\endgroup$
1
1
$\begingroup$

It is assuming that sibs will be mating. Looking at that transition matrix you can see that both the S1 and S6 states will be "absorbing, i.e. once the historical situation results in either of those states, where will be no change. You can see that is the case because their row vectors have a 1 in them. So any of the other 4 states are not absorbing and will eventually transition away from that state. The 4 is labeling the S3 state and the 1 is labeling the S6 state. You can see from the graph that the situation at the 20th generation is that most of the probability lies with the two absorbing states: S1 and S6 in this case (although I think the matplot results in a reversal of the state labels.)

The v is essentially the fractional composition of a hypothetical population. That vector could be a 1 in one of the positions if the composition were a pure instance of one of the pairing, but it could also be a mixture: say 0.5 assigned to one pairing, 0.25 to another and 0.25 to a third. The only requirement is that all the elements be non-zero and that they sum to 1.

You could also model a population of any size, say for instance 1000, and then you vector could be v=c(100, 200, 400,200,100). It's really not a stochastic model, though. There no way of assessing the potential variability in outcomes.

$\endgroup$
3
  • $\begingroup$ Thank you for the answer. Can you clarify The 4 is labeling the S3 state and the 1 is labeling the S6 state?. Also, what is v representing in that equation - it should be S3, but how? $\endgroup$ – everestial007 Jan 15 '18 at 16:24
  • $\begingroup$ I think the labelings get reversed. You could test that theory by using v=c(1,0,0,0,0,0) and seeing if it is the number 6 that stays at 1.0. Oooops, theory tested and discarded. I don't know why starting with your example the "4" is at 1.0 at time=1. $\endgroup$ – DWin Jan 15 '18 at 16:31
  • $\begingroup$ Hi @djwin: can you share some thoughts on this problem stats.stackexchange.com/questions/325106/… $\endgroup$ – everestial007 Jan 26 '18 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.