I am finding problem in getting solution for my date variable that is string variable.
My problem is if I am using generation function gen date2=date(date,"DMY") for my monthly dates, I am getting exact dates I wanted but when I do the Panel data UNIT ROOT test it says the gap in data. I tried removing the months for which I don't have corresponding values but still the problem does not solves.
However, if I am using encode function encode date, gen (monthly), stata is taking the dates as 2Jan1960 for the corresponding date of 1Jan2011. I can do the Panel data Unit root test without any error message of gap in data.
for your perusal the glimpse of my data
| REGION NAME | DATE | Absolute Values | 
| Andhra Pradesh | 01 January 2011 | 90.6 | 
| Bihar | 01 January 2011 | 89.5 | 
| Gujarat | 01 January 2011 | 89.3 | 
| Haryana | 01 January 2011 | 89.9 | 
| India | 01 January 2011 | 89.5 | 
| Karnataka | 01 January 2011 | 88.9 | 
| Kerala | 01 January 2011 | 89.9 | 
| Madhya Pradesh | 01 January 2011 | 89.2 | 
| Maharashtra | 01 January 2011 | 90.2 | 
| NCT of Delhi | 01 January 2011 | 88.4 | 
| Punjab | 01 January 2011 | 90.8 | 
| Rajasthan | 01 January 2011 | 89.2 | 
| Tamil Nadu | 01 January 2011 | 89.3 | 
| Telangana | 01 January 2011 | 88.3 | 
| Uttar Pradesh | 01 January 2011 | 89.2 | 
| West Bengal | 01 January 2011 | 88.3 | 
| Andhra Pradesh | 01 February 2011 | 88.4 | 
| Bihar | 01 February 2011 | 88.1 | 
| Gujarat | 01 February 2011 | 88 | 
| Haryana | 01 February 2011 | 89.3 | 
| India | 01 February 2011 | 88.4 | 
| Karnataka | 01 February 2011 | 88.3 | 
| Kerala | 01 February 2011 | 89.6 | 
| Madhya Pradesh | 01 February 2011 | 88.6 | 
| Maharashtra | 01 February 2011 | 89 | 
| NCT of Delhi | 01 February 2011 | 87.8 | 
| Punjab | 01 February 2011 | 89.4 | 
| Rajasthan | 01 February 2011 | 88.5 | 
| Tamil Nadu | 01 February 2011 | 88 | 
| Telangana | 01 February 2011 | 86.7 | 
| Uttar Pradesh | 01 February 2011 | 88 | 
| West Bengal | 01 February 2011 | 87.9 | 
Please guide me How should I address this problem.
0 Response to Date Variable problem
Post a Comment