Hello,
I wish to perform an analysis of the gender wage gap, similar to the one attached. My question is what the text in "Notes" mean with regards to calculating the female/male log hourly ratios. I have in my own dataset, generated log wages for men and women, however, I am not quite sure how to generate a ratio. When I take logwages of women divided by log wages of men to get a ratio, the ratio is almost 1, which makes me think that this is not the correct way to do it. The "Notes" section says that they take the logwages of women minus the logwages of men, however, is this equal to the ratio then?
This is what I have done so far:
// Generating mean log wages for men and women//
bysort year sex: egen meanlnwage = mean(lnwage)
bysort year: egen meanlnwagef = mean(lnwage / (sex == 2))
bysort year: egen meanlnwagem = mean(lnwage / (sex == 1))
//Generating gender wage gap and displaying for each year//
gen gap = meanlnwagem-meanlnwagef
egen tag = tag(year)
tabdisp year if tag, c(meanlnwagem meanlnwagef gap)
The table below is what I want to achieve:

I wish to perform an analysis of the gender wage gap, similar to the one attached. My question is what the text in "Notes" mean with regards to calculating the female/male log hourly ratios. I have in my own dataset, generated log wages for men and women, however, I am not quite sure how to generate a ratio. When I take logwages of women divided by log wages of men to get a ratio, the ratio is almost 1, which makes me think that this is not the correct way to do it. The "Notes" section says that they take the logwages of women minus the logwages of men, however, is this equal to the ratio then?
This is what I have done so far:
// Generating mean log wages for men and women//
bysort year sex: egen meanlnwage = mean(lnwage)
bysort year: egen meanlnwagef = mean(lnwage / (sex == 2))
bysort year: egen meanlnwagem = mean(lnwage / (sex == 1))
//Generating gender wage gap and displaying for each year//
gen gap = meanlnwagem-meanlnwagef
egen tag = tag(year)
tabdisp year if tag, c(meanlnwagem meanlnwagef gap)
The table below is what I want to achieve:
Comment