Page 1 of 1

IF condition in panel dataset

Posted: Fri Feb 24, 2017 1:19 pm
by jackbauer
Hi all,

I was wondering if anybody could help me with a question on using an IF statement in a panel dataset. I have a dummy dependent variable that takes on a value of 1 when a financial crisis occurs, and 0 otherwise. I would like to exclude a country from the panel for two years following a crisis, or two years following a 1. Any suggestions on the best way to do this are much appreciated!

Re: IF condition in panel dataset

Posted: Fri Feb 24, 2017 1:55 pm
by EViews Gareth

Code: Select all

if dum=1 or dum(-1)=1 or dum(-2)=1