Page 1 of 1

Logical connections of smpls

Posted: Wed May 06, 2015 1:05 am
by mamo
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

Re: Logical connections of smpls

Posted: Wed May 06, 2015 6:01 am
by startz
try

Code: Select all

smpl if not lowcross or late

Re: Logical connections of smpls

Posted: Fri May 08, 2015 12:21 am
by mamo
Many thanks for this hint.
( I'd better read more carefully the documentation where indeed this feature has been well documented.)
Best, Mamo

Re: Logical connections of smpls

Posted: Fri May 08, 2015 6:14 am
by startz
I didn't know about it either until Gareth explained it to me one day.

Re: Logical connections of smpls

Posted: Fri May 08, 2015 10:21 am
by EViews Glenn
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.