Page 1 of 1

alternative to if-statements with series

Posted: Mon Sep 06, 2010 9:03 am
by marco.stringa
I would like to write a flexible programme that excludes observations with particular characteristics. For example, I want to temporary excludes some observations belonging to a series where some variables take too high or too low values (eg for several independent series with 100 realisations I want to exclude the 1st and 99th percentiles of each series).

Unfortunately the easier solution a ‘if/then/else statement’ command cannot be used with series.
Thank you,

Marco
PS I am using e-views 6.

Re: alternative to if-statements with series

Posted: Mon Sep 06, 2010 9:40 am
by startz
You want smpl if, which specifies a condition for including observations. For example

Code: Select all

smpl if X>-1 and X<17

Re: alternative to if-statements with series

Posted: Mon Sep 06, 2010 10:36 am
by marco.stringa
Thank you very - sorry i thought I could not use the "if" with series in any case.