Hi, R-helpers,

I'm trying to use R to do a Monte Carlo simulation and need the help. What I
have is a matrix that consists of the probabilities for the persons to
choose zones. For example, in the matrix shown below, each column represents
a person, and each row represents a zone. So, the probability that the first
person will choose the 2nd zone is 30%.

 25% 30% 10%  30% 20% 0%  20% 50% 60%  50% 0% 10%  20% 0% 20%

Based on this matrix, I want to locate the persons to zones based on the
probability using a Monte Carlo method. The result I want to see is like
this:

 0 0 0  0 0 0  0 1 1  1 0 0  0 0 0

Could anyone please give some help? Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to