question on sample selection

For questions regarding programming in the EViews programming language.

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

miorinnovo
Posts: 123
Joined: Sun Mar 01, 2015 5:01 pm

question on sample selection

Postby miorinnovo » Mon Feb 26, 2018 9:27 am

Hi,

I'd like to analyse properties of the first month of each quarter in a data series. I'm thinking I should just create a new series with NA's for all other months but I'm wondering what is a faster way to create the sample than this

Code: Select all

smpl 2000:01 2000:01 2000:04 2000:04 etc etc


Thanks!

startz
Non-normality and collinearity are NOT problems!
Posts: 3367
Joined: Wed Sep 17, 2008 2:25 pm

Re: question on sample selection

Postby startz » Mon Feb 26, 2018 9:57 am

Maybe

Code: Select all

smpl if @month=1 or @month=4 or @month=7 or @month=10

miorinnovo
Posts: 123
Joined: Sun Mar 01, 2015 5:01 pm

Re: question on sample selection

Postby miorinnovo » Mon Feb 26, 2018 10:13 am

Thank you!

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

Re: question on sample selection

Postby EViews Gareth » Mon Feb 26, 2018 12:43 pm

Code: Select all

smpl if @quarter<>@quarter(-1)
Follow us on Twitter @IHSEViews

EViews Matt
EViews Developer
Posts: 284
Joined: Thu Apr 25, 2013 7:48 pm

Re: question on sample selection

Postby EViews Matt » Mon Feb 26, 2018 3:36 pm

Or,

Code: Select all

smpl if @mod(@month,3)=1


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 11 guests