|
Sorry. I re-read your original message, and now I see I misunderstood it.
I still think it is a bad idea to grow the larger sample from the empirical
distribution, but there may be some reason to do that. At least the values
in your example are discrete, rather than continuous.
Tim Berryhill - Contract Programmer and General Wizard
TWB2@PGE.COM or http://www.aartwolf.com/twb.html
Frequently at Pacific Gas & Electric Co., San Francisco
The correlation coefficient between their views and
my postings is slightly less than 0
> ----------
> From:
> abdu.elnagheeb@nationsbank.com[SMTP:abdu.elnagheeb@nationsbank.com]
> Sent: Thursday, June 24, 1999 11:54 AM
> To: Berryhill, Timothy
> Subject: RE: Simulated Sample
>
> Thanks Tim. I should have been more clear. What I wanted is to draw a
> larger
> "random" sample from the SAME empirical distribution rather than
> "replicate"
> the small sample. Your idea is special case. Thanks again.
>
> abdu
>
>
>
>
> TWB2@pge.com on 06/24/99 02:21:14 AM
> Please respond to TWB2@pge.com @ SMTP
> To: Abdu Elnagheeb/CardServ/NationsBank@NATIONSBANK,
> 'abdu.elnagheeb@nationsbank.com' @ SMTP, SAS-L@LISTSERV.UGA.EDU @ SMTP
> cc:
> Subject: RE: Simulated Sample
>
> Abdu, You could generate EXACTLY the effect you describe very simply:
>
> %* How much bigger is the new sample?;
> %let times=10;
> DATA NEW;
> SET OLD;
> DO LOOP=1 TO ×
> OUTPUT;
> END;
> RUN;
>
> In passing, I suggest this is a VERY bad idea.
>
> Tim Berryhill - Contract Programmer and General Wizard
> TWB2@PGE.COM or http://www.aartwolf.com/twb.html
> Frequently at Pacific Gas & Electric Co., San Francisco
> The correlation coefficient between their views and
> my postings is slightly less than 0
>
>
> > ----------
> > From:
> > abdu.elnagheeb@nationsbank.com[SMTP:abdu.elnagheeb@NATIONSBANK.COM]
> > Reply To: *abdu.elnagheeb@nationsbank.com
> > Sent: *Thursday, June 24, 1999 7:23 AM
> > To: *SAS-L@LISTSERV.UGA.EDU
> > Subject: *Simulated Sample
> >
> > Hello all,
> > I will appreciate any help (or macro) that will do the following.
> Suppose,
> > I
> > have a sample of size n on a variable X (x1, x2, ....,xn). I want to
> > generate a
> > larger sample (maybe 10*n) which will follow the same ("empirical"0
> > distribution of X .
> > Does SAS has a way of doing that or do I have to write a macro?
> >
> > My thoughts are as follows.
> > *Sort the small sample by X and generate the ranks and empirical
> > cumulative
> > distribution function (EDF).
> > *Generate the large sample using a RANUNI generator. Let this ranuni
> > variable
> > be called F.
> > * Compare F to the EDF and select the X that correspond to the EDF. For
> > example,
> > ***small sample**
> > X EDF
> > -------------------
> > 5 1/5
> > 10 2/5
> > 15 3/5
> > 20 4/5
> > 25 5/5
> >
> > If my generated ranuni is 0.23, my X will be 10 (.23 closest to .2).
> This
> > may
> > not be a good example but will give the idea.
> > Are these thoughts correct? and if so, what is the most efficient way of
> > doing
> > that?
> > PLEASE, respond to me as I don't have access to the list now. Thanks,
> >
> > abdu
> >
>
>
|