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
Trying to run a predicted probabilities plot with a twoway scatterplot with a splineI accidentally created two threads of the same thing …
Coefficient interpretation from a GLM regression family(gamma) link(log)Hi all, I am trying to explain some coefficients from a GLM regression with family(gamma) link(log)…
OutliersDear All, I have a quick question, Is it necessary to remove outliers from survey data? Would that…
Missing variables using reshape wide commandHi, This is the command I'm using- reshape wide day_piece, i(farm) j(day_sales) string And this is…
Combining two panel databasesDear Stata team, I was wondering if anyone could help me with the following: I have a panel databas…
Subscribe to:
Post Comments (Atom)
0 Response to combine four categorical variables altogether and generate new variable
Post a Comment