Hello,
I have a large dataset but I do not need all observations. The dataset contains data for every day within the period from 1989 to 2019. How can I delete all observations in Stata except for the last day of each year and for each company? (the variable name and format is attached with the image)
Example:
Permno Data n Ret alpha ....
1001 31dec1989
1001 31dec1990
1001 31dec1991
...
1001 31dec2019
1002 31dec1989
1002 31dec1990
...
Thank you very much!
Best regards
Sven
Array
0 Response to How to drop specific observations from dataset in Stata?
Post a Comment