Hi,
I have a panel data set with dates formatted as "YM" in stata. The time period is monthly from year 2003 onwards (2003m1,2003m2.....). I want to keep or extract the observations for the entire year 2007 only (starting from 2007m1 till 2007m12). When I give code as:
Keep if Time_Period==2007m1, 2007m2....
It says invalid syntax or stata does-not recognize 2007m1....
Although my Time_period is stata formatted dates(not string), but I don't know how to refer to a particular date (monhtly in my case) with if function.
Can Somebody help please?
Regards
I have a panel data set with dates formatted as "YM" in stata. The time period is monthly from year 2003 onwards (2003m1,2003m2.....). I want to keep or extract the observations for the entire year 2007 only (starting from 2007m1 till 2007m12). When I give code as:
Keep if Time_Period==2007m1, 2007m2....
It says invalid syntax or stata does-not recognize 2007m1....
Although my Time_period is stata formatted dates(not string), but I don't know how to refer to a particular date (monhtly in my case) with if function.
Can Somebody help please?
Regards
Comment