IF condition in panel dataset

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

jackbauer
Posts: 1
Joined: Thu Feb 23, 2017 9:24 am

IF condition in panel dataset

Postby jackbauer » Fri Feb 24, 2017 1:19 pm

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!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: IF condition in panel dataset

Postby EViews Gareth » Fri Feb 24, 2017 1:55 pm

Code: Select all

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


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests