generating series

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

selin1000
Posts: 40
Joined: Tue Mar 06, 2012 1:56 pm

generating series

Postby selin1000 » Sat Aug 11, 2012 1:35 pm

good afternoon !

I am new to programming in eviews and I have a rather simple question. I want to generate a series x that takes the value 1 if y is 0 and 0 otherwise. I run the following code but I get an error:( I will appreciate a lot if anybody can offer some feedback...

for i=1:1910
if y(i)=0
genr x(i)=1
else
genr x(i)=0
endif

Thanks a lot :)

Selin

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

Re: generating series

Postby EViews Gareth » Sat Aug 11, 2012 2:00 pm

Follow us on Twitter @IHSEViews

selin1000
Posts: 40
Joined: Tue Mar 06, 2012 1:56 pm

Re: generating series

Postby selin1000 » Sat Aug 11, 2012 2:14 pm

Ive made it :) thanks so much! have a great day!


Return to “Programming”

Who is online

Users browsing this forum: Google [Bot] and 6 guests