Dear Stata forum,
I would like to calculate a median and I know that Stata provides the code for MAD with egen but it can be only handled with one variable at a time.
So I tried to make a new variable with four different variables with same number of categories
There are four variables like this; 4 different qualifications.
But I didn't want to try rowmean because I thought it will just give you the mean with it.
or don't want to plus four variables and divide it with 4.
What should I do?
thanks a lot
- tab qfimcmt
Qualification for |
immigration: |
committed to way of |
life in country | Freq. Percent Cum.
----------------------+-----------------------------------
Extremely unimportant | 1,099 2.81 2.81
1 | 448 1.14 3.95
2 | 704 1.80 5.75
3 | 978 2.50 8.25
4 | 1,066 2.72 10.97
5 | 3,657 9.34 20.31
6 | 2,628 6.71 27.02
7 | 4,589 11.72 38.74
8 | 7,271 18.57 57.32
9 | 5,474 13.98 71.30
Extremely important | 11,238 28.70 100.00
----------------------+-----------------------------------
Total | 39,152 100.00
Related Posts with combine four categorical variables altogether and generate new variable
Problem with summing using CollapseHi - I'm having a problem with the Collapse command when I try to obtain the sum of variables. My da…
Insert comma in string variableHi, I have a numeric variable that I would like to convert into a string variable with commas separ…
Difference-in-means tests for the propensity-matched sampleIs there an efficient way in Stata to report the results of difference in means tests on propensity …
Yearly standard deviation of daily returnsHi Community, for a paper at university i need to calculate the annualized standard deviation of da…
3 plots gathered in 1 subplotHi, I am struggling to gather 3 plots in 1 unique figure with 3 subplots. I want the subplots to de…
Subscribe to:
Post Comments (Atom)
0 Response to combine four categorical variables altogether and generate new variable
Post a Comment