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
which method would be appropriate probit, logit, or anything else?Good morning, everyone, I am not very familiar with existing econometric methods, especially with s…
Please help me troubleshoot converting string date("20100201") into the format Stata recognizes as dateHi, I was converting string date data (variable Fdate and Pdate, they look like "20100201") into num…
Graph with standard deviation on the y axisDear Stata users, I am trying to replicate the paper "Revisiting the German wage structure" https://…
Merging variablesHi everyone, I have 4 binary variables: #1. Tested for HIV during antenatal care (coded as 0/1) #2.…
ImputationI am analysing a small number of patients (n=28) and want to do Spearman rank correlation. For one v…
Subscribe to:
Post Comments (Atom)
0 Response to combine four categorical variables altogether and generate new variable
Post a Comment