How to compute the number of elements above group's mean value?
How is it possible to compute the number of elements (observations) above each group's mean value. The table or chart should show for each category/group the number of observations which are above of mean of the categrory (Attention: Not the overall mean of all categories). There are more than one category in the dataset I am working on.
I tried to use the following code to achieve the desired result: