Page 1 of 1

any command to create series with binary distribution?

Posted: Tue Nov 03, 2015 1:06 pm
by hirastikanah
hello

is there any command to create series with binary distribution?
something like @rnd for normal distribution


thanks in advance!

Re: any command to create series with binary distribution?

Posted: Tue Nov 03, 2015 1:48 pm
by EViews Gareth

Re: any command to create series with binary distribution?

Posted: Tue Nov 03, 2015 2:10 pm
by EViews Glenn
For a binary, just use @rnd (note that @rnd is a random uniform, not normal) to create a dummy using the desired success probability, as in

Code: Select all

series binary = @rnd > (1-p)
will generate a (0, 1) variable with success probability p.

Re: any command to create series with binary distribution?

Posted: Thu Nov 05, 2015 12:07 am
by hirastikanah
For a binary, just use @rnd (note that @rnd is a random uniform, not normal) to create a dummy using the desired success probability, as in

Code: Select all

series binary = @rnd > (1-p)
will generate a (0, 1) variable with success probability p.


Great!
thanks a lot :)