generating series with if condition

For questions regarding programming in the EViews programming language.

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

Eppichgyo
Posts: 11
Joined: Mon Mar 18, 2019 11:17 am

generating series with if condition

Postby Eppichgyo » Wed Apr 03, 2019 11:07 am

Hi,

I want to create 'previous dec=100' index. I create in Excel a dummy series with value 1 if month=January else 0.

My code:

if dummy=1 then
prev_dec=cpi/cpi(-1)*100
else
prev_dec=prev_dec(-1)*(cpi/cpi(-1))
endif

but it does not work

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

Re: generating series with if condition

Postby EViews Gareth » Wed Apr 03, 2019 11:11 am

Follow us on Twitter @IHSEViews

Eppichgyo
Posts: 11
Joined: Mon Mar 18, 2019 11:17 am

Re: generating series with if condition

Postby Eppichgyo » Wed Apr 03, 2019 11:36 am

EViews Gareth wrote:http://forums.eviews.com/viewtopic.php?f=5&t=3765


Thanks Gareth


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 4 guests