Hi,
I am using stata 13.
I have a Var1a which is coded with values from 1 to 5. Var1b is also coded with values from 1 to 5. Each value has a frequency. I am trying to count the total number of observations across Var1a and Var1b to get a total frequency figure for each label.
For example:
2 40 2 30
3 20 3 10
4 10 4 25
5 5 5 35
I would like to create a variable Var2 which has the freq values 1:70, 2: 70 etc.
I have been looking at the egen functions but I can't seem to find a command that would do the trick.
Thanks,
I am using stata 13.
I have a Var1a which is coded with values from 1 to 5. Var1b is also coded with values from 1 to 5. Each value has a frequency. I am trying to count the total number of observations across Var1a and Var1b to get a total frequency figure for each label.
For example:
Var1a Var1b1 50 1 20
2 40 2 30
3 20 3 10
4 10 4 25
5 5 5 35
I would like to create a variable Var2 which has the freq values 1:70, 2: 70 etc.
I have been looking at the egen functions but I can't seem to find a command that would do the trick.
Thanks,
Comment