luan_sheng
2005-May-27 13:26 UTC
[R] how to get this kind of binomial distribution simulation number?
hai, I want to perform a simulation like this仯伜 Suppose that I have one population ,it's size is 500, is composed of x,y and z. The probability of x, y and z is respectively is 0.3, 0.5, 0.2. I wan to simulate a new same size population based ratio of x, y and z, how can I get and assess the number of x, y and z. ? luan Key Laboratory for Sustainable Utilization of Marine Fisheries Resources, Ministry of Agriculture ,Yellow Sea Fisheries Research Institute, Chinese Academy of Fishery Sciences, Qingdao 266071,China __________________________________________________ 佈伵伝仮伱佲伔佈G佊伿佅佷仯伃佒佇伖侜伒佢佉伝伨侙佄佫伬伂伝侙佊伿伡侢伾仹伻伵伋伂伌侒佊伿佅佷
Uwe Ligges
2005-May-27 13:47 UTC
[R] how to get this kind of binomial distribution simulation number?
luan_sheng wrote:> > hai, I want to perform a simulation like this仯伜 > > Suppose that I have one population ,it's size is 500, is composed of x,y > and z. The probability of x, y and z is respectively is 0.3, 0.5, 0.2. I > wan to simulate a new same size population based ratio of x, y and z, how > can I get and assess the number of x, y and z. ?PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html I guess you are looking for ?table, but your question is much too unspecific.... Uwe Ligges> luan > > Key Laboratory for Sustainable Utilization of Marine Fisheries Resources, > Ministry of Agriculture ,Yellow Sea Fisheries Research Institute, Chinese > Academy of Fishery Sciences, Qingdao 266071,China > > __________________________________________________ > > 佈伵伝仮伱佲伔佈G佊伿佅佷仯伃佒佇伖侜伒佢佉伝伨侙佄佫伬伂伝侙佊伿伡侢伾仹伻伵伋伂伌侒佊伿佅佷 > > ______________________________________________ > R-help at 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
Huntsinger, Reid
2005-May-27 14:00 UTC
[R] how to get this kind of binomial distribution simulation number?
rmultinom(n=1,size=500,prob=c(0.3,0.5,0.2)) to get n samples each of size 500 just use the "n=" argument. Reid Huntsinger -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of luan_sheng Sent: Friday, May 27, 2005 9:26 AM To: r-help at stat.math.ethz.ch; R-help at stat.math.ethz.ch Subject: [R] how to get this kind of binomial distribution simulation number? hai, I want to perform a simulation like this仯伜 Suppose that I have one population ,it's size is 500, is composed of x,y and z. The probability of x, y and z is respectively is 0.3, 0.5, 0.2. I wan to simulate a new same size population based ratio of x, y and z, how can I get and assess the number of x, y and z. ? luan Key Laboratory for Sustainable Utilization of Marine Fisheries Resources, Ministry of Agriculture ,Yellow Sea Fisheries Research Institute, Chinese Academy of Fishery Sciences, Qingdao 266071,China __________________________________________________ 佈伵伝仮伱佲伔佈G佊伿佅佷仯伃佒佇伖侜伒佢佉伝伨侙佄佫伬伂伝侙佊伿伡侢伾仹伻伵伋伂伌侒佊伿佅佷 ______________________________________________ R-help at 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