series with embedded smpl?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

cbonham
Posts: 22
Joined: Sat Jul 29, 2017 12:38 pm

series with embedded smpl?

Postby cbonham » Wed Aug 02, 2017 12:24 pm

Is there any way to manipulate a series over a specified sample period without issuing a separate smpl command?

For example, in other software packages I have worked with it is possible to write something like

series 2017Q1 2017Q2 sersx = 25
series 2017Q3 2017Q3 sersx = 30
series 2017Q4 2017Q4 sersx = 40

to create sersx for 2017Q1-17Q4 as
25, 25, 30, 40

Thanks
Carl

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

Re: series with embedded smpl?

Postby EViews Gareth » Wed Aug 02, 2017 1:13 pm

Code: Select all

sersx.adjust =25 @ 2017q1 2017q2
Follow us on Twitter @IHSEViews

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

Re: series with embedded smpl?

Postby EViews Matt » Wed Aug 02, 2017 1:21 pm

Hello,

Avoiding the use of smpl or sample objects, when you're assigning values to sequential observations the series fill proc is useful, e.g.:

Code: Select all

series sersx
sersx.fill(o=2017Q1) 25, 25, 30, 40

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

Re: series with embedded smpl?

Postby EViews Gareth » Wed Aug 02, 2017 1:48 pm

His is better than mine.
Follow us on Twitter @IHSEViews

cbonham
Posts: 22
Joined: Sat Jul 29, 2017 12:38 pm

Re: series with embedded smpl?

Postby cbonham » Wed Aug 02, 2017 6:53 pm

Thanks for the quick and useful replies.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 23 guests