smpl

For questions regarding programming in the EViews programming language.

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

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

smpl

Postby tvonbrasch » Tue May 02, 2023 11:38 pm

I (mistakenly) thought that

Code: Select all

smpl yyyy yyyy+4
would be equivalent to:

Code: Select all

smpl yyyy yyyy:1+5
but, it is not, see pictures below. what is it that the command

Code: Select all

smpl yyyy yyyy+5
actually does?
t
2023-05-03 08_31_57-EViews.png
2023-05-03 08_31_57-EViews.png (5.57 KiB) Viewed 12654 times
2023-05-03 08_32_13-EViews.png
2023-05-03 08_32_13-EViews.png (5.37 KiB) Viewed 12654 times

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

Re: smpl

Postby EViews Matt » Wed May 03, 2023 11:33 am

Hello,

In a smpl statement, e.g. "smpl <start> <end>", the <start> specification uses the first observation within that specification while the <end> specification uses the last observation within that specification (this is only an issue when the specification as at a lower frequency than the workfile). Consequently, in a quarterly workfile the statement

Code: Select all

smpl yyyy yyyy+5
is interpreted as

Code: Select all

smpl yyyy:1 yyyy:4+5 ' not yyyy:1+5

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Re: smpl

Postby tvonbrasch » Wed May 03, 2023 11:24 pm

great, thanks!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests