Hello everyone.
I'm using a categorical variable with the prefix -i-. This categorical variable has over 3000 different categories.
In the regression, probably many of those categories are ruled out.
So, I would like to know if there is a (direct) way to count how many categories are used in the regression.
For instance:
Let's suppose x2 has 3000 categories. But, for instance, many categories have too few observations. Stata ruled them out and finally used only 1500.
I want to know how I can get that number (1500).
Many thanks in advance.
I'm using a categorical variable with the prefix -i-. This categorical variable has over 3000 different categories.
In the regression, probably many of those categories are ruled out.
So, I would like to know if there is a (direct) way to count how many categories are used in the regression.
For instance:
Code:
reg y x1 i.x2
I want to know how I can get that number (1500).
Many thanks in advance.
Comment