Hi everyone,
I have a question (I'm working full time on Stata during this period and not always I'm able to solve the problems).
I would like to create a new variable that measure, for each job, the percentage of workers more satisfied with respect to the median of satisfaction of the whole labor market.
In other words, I have the median of job satisfaction (let's say, value 7, from 0 to 10). For each job I would like to know the percentage of workers that rate a job_satisfaction above the value of 7. I would opt to this, instead of the mean, because it is less sensitive to outliers.
Here some code (variable of job satisfaction)
Thanks a lot, as always.
Best, G.P.
I have a question (I'm working full time on Stata during this period and not always I'm able to solve the problems).
I would like to create a new variable that measure, for each job, the percentage of workers more satisfied with respect to the median of satisfaction of the whole labor market.
In other words, I have the median of job satisfaction (let's say, value 7, from 0 to 10). For each job I would like to know the percentage of workers that rate a job_satisfaction above the value of 7. I would opt to this, instead of the mean, because it is less sensitive to outliers.
Here some code (variable of job satisfaction)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double job_sat 6 8 5 10 9 9 10 6 8 8 0 0 8 10 10 7 7 9 6 10 3 8 10 6 5 9 3 8 7 8 7 8 7 0 8 9 7 10 10 6 9 8 10 8 4 9 10 8 8 9 9 5 4 9 6 8 10 3 4 8 9 3 7 5 8 8 2 5 9 7 10 6 8 7 9 9 2 0 4 5 10 3 8 2 5 7 10 8 5 6 5 7 8 4 7 5 7 3 7 1 end label values job_sat stfjb label def stfjb 0 "Extremely dissatisfied", modify label def stfjb 1 "1", modify label def stfjb 2 "2", modify label def stfjb 3 "3", modify label def stfjb 4 "4", modify label def stfjb 5 "5", modify label def stfjb 6 "6", modify label def stfjb 7 "7", modify label def stfjb 8 "8", modify label def stfjb 9 "9", modify label def stfjb 10 "Extremely satisfied", modify
Best, G.P.
Comment