Good evening everyone,
I am working with a dataset which has individual weights. I would like to calculate the regional wage gap for descriptive statistics.
Without weights, I would have used the following command:
How can I achieve a similar outcome using svy? My main issue is generating a new variable that contains the wage gap or even just exporting the table whit diffI for each region and year.
Many thanks in advance for your help and time
I am working with a dataset which has individual weights. I would like to calculate the regional wage gap for descriptive statistics.
Without weights, I would have used the following command:
Code:
bysort year region : egen meanf = mean(cond(Female == 1, retribuzione_sum, .)) bysort year region : egen meanm = mean(cond(Female == 0, retribuzione_sum, .)) gen diffI = (meanm - meanf) / meanm
Many thanks in advance for your help and time
Comment