Dear All,
In my dataset I have a categorical variable with different sub-categories:
I have several other variables (var1 var2 var3...) with numeric values corresponding to each of the category. I'm trying to calculate the total of the values for each sub-category and collapse the categorical variable into general categories like:
where the values corresponding to A is the sum of A1, A2, A3 A4, the values corresponding to B is the sum of B1, B2, ...
Haven't figure out a way to do it yet...any suggestions?
Any help is appreciated!
Many thanks,
Craig
In my dataset I have a categorical variable with different sub-categories:
Code:
A1 A2 A3 A4 B1 B2 C1 C2 C3
Code:
A B C
Haven't figure out a way to do it yet...any suggestions?
Any help is appreciated!
Many thanks,
Craig
Comment