Hi,

I have an unbalanced panel for 350,000 firms for the years 1995 to 2008. I want to see for how many firms I have data only for the year 2008. So basically I want to summarize the firmids for each year separately showing firms for which data is available only for that particular year. But am unable to do so. A sum firmid if year==2008 is giving me all firms for which data is available for 2008 irrespective of whether it is available for other years. I want only the number of firms for which data is available for year 2008 but not for any of the other years. How do I check for that in STATA. I need to work on this dataset for my prof urgently. So any help on how to get the number of observations would be highly appreciated.

I have an unbalanced panel for 350,000 firms for the years 1995 to 2008. I want to see for how many firms I have data only for the year 2008. So basically I want to summarize the firmids for each year separately showing firms for which data is available only for that particular year. But am unable to do so. A sum firmid if year==2008 is giving me all firms for which data is available for 2008 irrespective of whether it is available for other years. I want only the number of firms for which data is available for year 2008 but not for any of the other years. How do I check for that in STATA. I need to work on this dataset for my prof urgently. So any help on how to get the number of observations would be highly appreciated.

Last edited: