Re: [R] how to generate a random data from a empirical distribition

2010-07-28 Thread xin wei
hi, Frank: how can we make sure the randomly sampled data follow the same distribution as the original dataset? i assume each data point has the same prabability to be selected in a simple random sampling scheme. thanks -- View this message in context:

Re: [R] how to generate a random data from a empirical distribition

2010-07-28 Thread Frank Harrell
This is true by definition. Read about the bootstrap which may give you some good background information. Frank E Harrell Jr Professor and ChairmanSchool of Medicine Department of Biostatistics Vanderbilt University On Wed, 28 Jul 2010, xin wei wrote: hi,

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Peter Dalgaard
David Winsemius wrote: On Jul 26, 2010, at 2:36 PM, xin wei wrote: hi, this is more a statistical question than a R question. but I do want to know how to implement this in R. I have 10,000 data points. Is there any way to generate a empirical probablity distribution from it (the problem

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Dennis Murphy
Hi: On Mon, Jul 26, 2010 at 11:36 AM, xin wei xin...@stat.psu.edu wrote: hi, this is more a statistical question than a R question. but I do want to know how to implement this in R. I have 10,000 data points. Is there any way to generate a empirical probablity distribution from it (the

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Dr. Matthias Kohl
Hi Dennis, you should take a look at the CRAN task view for distributions http://cran.r-project.org/web/views/Distributions.html Beside that our distr-family of packages might be useful, see also http://www.jstatsoft.org/v35/i10/

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of xin wei Sent: Monday, July 26, 2010 11:36 AM To: r-help@r-project.org Subject: [R] how to generate a random data from a empirical distribition hi, this is more a

Re: [R] how to generate a random data from a empirical, distribition

2010-07-27 Thread Marshall Feldman
On 7/27/2010 6:00 AM, r-help-requ...@r-project.org wrote: Date: Mon, 26 Jul 2010 11:36:29 -0700 (PDT) From: xin weixin...@stat.psu.edu To:r-help@r-project.org Subject: [R] how to generate a random data from a empirical distribition Message-ID:1280169389379-2302716.p...@n4.nabble.com

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Greg Snow
Another option for fitting a smooth distribution to data (and generating future observations from the smooth distribution) is to use the logspline package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Frank Harrell
Easiest thing is to sample with replacement from the original data. This is the idea behind the bootstrap, which is sampling from the empirical CDF. Frank E Harrell Jr Professor and ChairmanSchool of Medicine Department of Biostatistics Vanderbilt University

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Greg Snow
If they want to generate directly from the empirical distribution, then sampling with replacement is the best choice (others had already suggested that). But the reference in the original post to the normal and beta distributions suggested to me that the original poster may have wanted a

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread weix1
Dennis: points well taken. It seems to be important to investigate the nature of distribution. I might be too naive to assume a emiprical probability distribution will be simply calculated from a clound of data points... -- View this message in context:

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread xin wei
hi, Dennis: points well taken. it seems to be important to investigate the nature of distribution. I may be too naive to assume a empirical probability distribution would be computed from a could of data points -- View this message in context:

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread xin wei
good point. It seems to be important to investigate the nature of distribution. I might be too naive to assume that a empirical probability distribution would be automatically generated from a cloud of data points. -- View this message in context:

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread xin wei
this is very insightful. sounds exactly like what I want to do. thanks. Frank. -- View this message in context: http://r.789695.n4.nabble.com/how-to-generate-a-random-data-from-a-empirical-distribition-tp2302716p2304346.html Sent from the R help mailing list archive at Nabble.com.

[R] how to generate a random data from a empirical distribition

2010-07-26 Thread xin wei
hi, this is more a statistical question than a R question. but I do want to know how to implement this in R. I have 10,000 data points. Is there any way to generate a empirical probablity distribution from it (the problem is that I do not know what exactly this distribution follows, normal,

Re: [R] how to generate a random data from a empirical distribition

2010-07-26 Thread David Winsemius
On Jul 26, 2010, at 2:36 PM, xin wei wrote: hi, this is more a statistical question than a R question. but I do want to know how to implement this in R. I have 10,000 data points. Is there any way to generate a empirical probablity distribution from it (the problem is that I do not know