any command to create series with binary distribution?

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

hirastikanah
Posts: 8
Joined: Mon Apr 08, 2013 12:23 pm

any command to create series with binary distribution?

Postby hirastikanah » Tue Nov 03, 2015 1:06 pm

hello

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


thanks in advance!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: any command to create series with binary distribution?

Postby EViews Gareth » Tue Nov 03, 2015 1:48 pm

Follow us on Twitter @IHSEViews

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: any command to create series with binary distribution?

Postby EViews Glenn » Tue Nov 03, 2015 2:10 pm

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.

hirastikanah
Posts: 8
Joined: Mon Apr 08, 2013 12:23 pm

Re: any command to create series with binary distribution?

Postby hirastikanah » Thu Nov 05, 2015 12:07 am

EViews Glenn wrote: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 :)


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 8 guests