mercredi 23 novembre 2016

R "non-random" number simulaton

enter image description here

This question is in regards to R. I would like to generate a "non-random" sample of 1's and 0's where the next value generated is dependant on the previous value. For example, if the first value in the vector is 1 then there is a 60% chance that next value is 1, and if the next value is a 0, then there is a 60% chance that the following will be 0. I have attached the question as it was posed to me. I greatly appreciate any help.




Aucun commentaire:

Enregistrer un commentaire