|
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
|