Logical connections of smpls

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

mamo
Posts: 192
Joined: Wed Nov 07, 2012 9:11 am

Logical connections of smpls

Postby mamo » Wed May 06, 2015 1:05 am

Dear Eviews team
I use Eviews 8.1
I nice-to-have feature would the possibility of logical connections of samples
Example (for panel data)

Code: Select all

smpl lowcross "if crossid < 10"
smpl late 2013 2015
' New suggested features:
' Define a new sample using logical connections of existing samples
sample lowlate lowcross and late
' Set sample using logical connections of existing samples
smpl not lowcross or late

Best, mamo

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

Re: Logical connections of smpls

Postby startz » Wed May 06, 2015 6:01 am

try

Code: Select all

smpl if not lowcross or late

mamo
Posts: 192
Joined: Wed Nov 07, 2012 9:11 am

Re: Logical connections of smpls

Postby mamo » Fri May 08, 2015 12:21 am

Many thanks for this hint.
( I'd better read more carefully the documentation where indeed this feature has been well documented.)
Best, Mamo

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

Re: Logical connections of smpls

Postby startz » Fri May 08, 2015 6:14 am

I didn't know about it either until Gareth explained it to me one day.

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: Logical connections of smpls

Postby EViews Glenn » Fri May 08, 2015 10:21 am

I'm not certain about what the original poster intended, but I do want to urge caution in keeping in mind the precedence of operators. In this example, the NOT modifies LOWCROSS, not LOWCROSS or LATE. Thus, we have
(not lowcross) or late

and not
not (lowcross or late)

if you wish to evaluate the latter sample, you may use parentheses. In general I find it makes sense to put them in whenever there may be an ambiguity, lest I surprise myself.


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 7 guests