[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Identify 1st observation in each group in a panel data model
I would very much appreciate your help with the following qusetion.
I am working with an unbalanced annual panel data of over 50,000
observations. The data set is made up of firms within countries over a
time period from 1987 - 2002. I generated a variable called “code” as
my panel identifier which assigns each firm a number. I also have
a “countryid” giving each country a number. Year is the variable I am
using for time.
I would like to know how to identify the first observation of
variable “X” for each firm in the panel ?. Specifically I would like
to generate a dummy variable (DV==1) if the value of the first
observation for variable X (for each firm) is less than “a”, and DV==0
Thank you in advance,
George Wshington University
* For searches and help try: