Jag Thank you for your suggestion. I need the output slightly different. I need two count variables - the first count variable contains the number of firms per industry. Each indsutry row will contain the total number of firms in that industry. - the second count variable contains the number of firms with positive value per industry. Each industry row will contain the number of firms with positive values in that industry. I need these two count variables so as to construct a ratio of # of positives divided by the total #. Using Pradeep's code, I have been able to construct the first variable and now, am trying to do the second. As far as retaining the firm with positive values each year, to avoid duplicate firms each year, I do not think that should be a problem, I had a look at the dataset. Thanks Namrata
... View more