Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: differences of mean


From   Yuval Arbel <yuval.arbel@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <cmussida@gmail.com> 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:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/



-- 
Dr. Yuval Arbel
School of Business
Carmel Academic Center
4 Shaar Palmer Street,
Haifa 33031, Israel
e-mail1: yuval.arbel@carmel.ac.il
e-mail2: yuval.arbel@gmail.com

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index