[R] Generate Random Samples

From: Peng Jiang <jp021_at_sjtu.edu.cn>
Date: Thu, 12 Jun 2008 23:24:25 +0800


Hi,

I am a newbie to R and I am working with a Mac.

Is there any package that I can use to generate random samples from a user defined distribution ? That is , I define a distribution function ( maybe multi dimension ) and I want some random samples generated from my this distribution.

Or, there is a more specific problem . If I have a three component mixture with each of them being normal distribution( say 3 dimension ) , is there any package that I can use to generate random samples from this mixture . I know I can generate random samples from each individual component. However, can I just add them directly????

Thanks.



Peng Jiang
江鹏
Ph.D. Candidate

Antai College of Economics & Management
安泰经济管理学院
Department of Mathematics
数学系
Shanghai Jiaotong University (Minhang Campus) 800 Dongchuan Road
200240 Shanghai
P. R. China



R-help_at_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. Received on Thu 12 Jun 2008 - 16:02:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Jun 2008 - 00:31:02 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive