LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 1999, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 1 Feb 1999 13:48:15 -0600
Reply-To:   hwang@ZSASSOCIATES.COM
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   hongjie Wang <hwang@ZSASSOCIATES.COM>
Subject:   simulating a distribution.
Content-Type:   text/plain; charset=us-ascii

I have a following problem. Given a dataset with var X. I like to use the obs in this dataset as a base to come up with a distribution, (not necessarily any known distribtution) and then begin to randomly simulate obs from this distribution. I was wondering if there is a proc in SAS that does that, or will help me doing this. Hopefully, I like to specify if the distribution is discrete or continuous with given ranges. I have something like that in mind for discrete case.

>From dataset T, generate a table with X Freq Probablity 1 300 0.3 2 200 0.2 4 500 0.6.

If we assume that 1,2,4 are the only values that are assumed by X, then we can randomly simulate this X from the distribution which is calculated based on freq.

I can see it is more difficult to deal with a continuous case, there are some methods in the literature of simulation. But, I was hoping that SAS has a procedure will do the following directly,

x_obs=Call SASPROC(dataset) , there dataset is the input dataset from which a distribution is determined and SASPROC will return a random var from this distribution.

Your input and info is greatly appreciated.

Thanks,

Hongjie Wang

ZS Associates Princeton, NJ 08536


Back to: Top of message | Previous page | Main SAS-L page