[R] generating markov chain

From: Norman Goodacre <taranpen_at_yahoo.co.uk>
Date: Mon 06 Feb 2006 - 15:26:22 EST

Dear help group,   

    Just fyi a markov chain is a sequence of transitions between states (say A,T,G,C - on a gene) with a given probability for each transition. In this case there'd be 16 different kinds, each with a different weight.     Given a transition matrix (4x4) filled with all transition probabilities of course, how can I generate a random sequence of a given length, say 200?   

   -Norman Goodacre                    

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Feb 06 20:47:17 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:24 EST