alternative to if-statements with series

For questions regarding programming in the EViews programming language.

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

marco.stringa
Posts: 3
Joined: Wed Aug 11, 2010 9:58 am

alternative to if-statements with series

Postby marco.stringa » Mon Sep 06, 2010 9:03 am

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.

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

Re: alternative to if-statements with series

Postby startz » Mon Sep 06, 2010 9:40 am

You want smpl if, which specifies a condition for including observations. For example

Code: Select all

smpl if X>-1 and X<17

marco.stringa
Posts: 3
Joined: Wed Aug 11, 2010 9:58 am

Re: alternative to if-statements with series

Postby marco.stringa » Mon Sep 06, 2010 10:36 am

Thank you very - sorry i thought I could not use the "if" with series in any case.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests