Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: differences of mean

From   Yuval Arbel <>
Subject   Re: st: differences of mean
Date   Tue, 27 Mar 2012 13:52:07 +0200

Hi Chiara,

Instead of working so hard simply run a regression between lwage and
fem. Assuming that you define fem=0 as males and fem=1 as females, the
coefficient of fem is expected to be negative reflecting the wage gaps
between males and females. If in addition the coefficient of fem is
significant this implies a significant wage differences between males
and females. The command is:

reg lwage fem

On Tue, Mar 27, 2012 at 1:41 PM, Chiara Mussida <> wrote:
> Dear All,
> I have to calculate the difference of mean log wages of men and women.
> My dataset contains the variable lwage which is the log of wages. I
> tried to generate the mean wage (also by occupation, for a more
> detailed difference):
> bys occupation: egen wage=mean(lwage)
> ge wage1f=wage if occupation==1 & fem==1
> ge wage1m=wage if occupation==1 & fem==0
> ge diff1=wage1m - wage1f if occupation==1
> but this gave me a variable diff1 with no observations, since the mean
> lwage for men is missing when the mean lwage for men it is not, and
> viceversa. Again, if I do replace the missing values of men and women
> with 0 this gives me false results (I know there is a difference
> between missing and 0).
> How should I get my variable diff= mean(lwage men) - mean(lwage
> women)? Total difference and/or difference by occupation.
> Thanks a lot
> Chiara
> *
> *   For searches and help try:
> *
> *
> *

Dr. Yuval Arbel
School of Business
Carmel Academic Center
4 Shaar Palmer Street,
Haifa 33031, Israel

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index