Re: random generation




Dear nitish,
I am a Satistica-StatSoft user :-)

There are many possibility to generate random number in Statistica.
You can do it directly by using the window dialog "All variable
specs" or by using a macro (in this case you have to be able to write
a code in Statistica Visual Basic).

In the first case (window dialog) you can follow these steps:

1) to create a new spread*** (for example, 10 variables and 10 cases)
2) to click on "Data" > "All variable Specs..."
3) you obtain the Variable Specifications Editor
4) for the var1, you can write into "Long Name (label or formula)"
, the code without quote : "=rnd(1)"
5) to click ok
6) you can see 10 values generated from the Uniform Distribution
between 0 and 1

More in general, the function Rnd(x) generates random numbers from the
Uniform Distribution between 0 and x.

At the same way, you can obtain random number with this code:

"=RndNormal(x)" (from a Normal Distribution with mu=0 and sigma=x)

"=RndPoisson(x)" (from a Poisson Distribution with x
parameter).

To obtain random number form other distributions, you have to use
rnd(x) function and the inverse distribution function (ITM: Inverse
Transformation Method).



In a similar way, you can use these function to generate random number
in a Statistica Macro, but you have to be experienced with Statistica
Visual Basic (are you?).

Finally you can see a paper about the quality of Statistica's random
generator:
http://www.statsoft.com/support/whitepapers/pdf/STATISTICA_number_generation.pdf



Michele De Meo
Sorry for my English :-)

.


Quantcast