How can I quickly create weekly dummy variables?

For questions regarding programming in the EViews programming language.

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

elmst616
Posts: 32
Joined: Fri Apr 29, 2016 2:36 pm

How can I quickly create weekly dummy variables?

Postby elmst616 » Tue Mar 28, 2017 10:06 am

Hi,

I have weekly data and I'm interesting in introducing weekly dummies to examine for seasonality. I tried using @expand(@week, @dropfirst) but I get an error message. Is there some other way to do this?

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

Re: How can I quickly create weekly dummy variables?

Postby EViews Gareth » Tue Mar 28, 2017 10:12 am

@expand(@datepart(@date, "WW"), @dropfirst)
Follow us on Twitter @IHSEViews

elmst616
Posts: 32
Joined: Fri Apr 29, 2016 2:36 pm

Re: How can I quickly create weekly dummy variables?

Postby elmst616 » Tue Mar 28, 2017 10:17 am

EViews Gareth wrote:@expand(@datepart(@date, "WW"), @dropfirst)



This works very well. Thank you!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 10 guests