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, is already up and running.

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

st: gen a variable

From   Chiara Mussida <>
To   statalist <>
Subject   st: gen a variable
Date   Thu, 22 Mar 2012 16:28:27 +0100

Dear All,
I wanto to gen variable for the sample proportions: men and women in
each occupation.
sum hwage lwage edu1 edu2 edu3 fem age married ftc northw northe
centre south partime pexper ncomp nkid3 nkid36 nkid612 d09 d10 if
cond3==1 & age>=15 & age<=64 & dipind==1 & hours>20 & hours<55 &

showsme the proportion I want to hava as a variable for each
occupation and gender. It is the value of fem (its mean). Is there a
way to generate a variable which takes the value computed by sum (for
each category) automatically in Stata after each sum?

Thanks a lot

Chiara Mussida
PhD candidate
Doctoral school of Economic Policy
Catholic University, Piacenza (Italy)
*   For searches and help try:

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