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 at the end of May, and its replacement, statalist.org is already up and running.


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

st:Help on egen mean variable by state and industry


From   prakash singh <prakashbhu@gmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st:Help on egen mean variable by state and industry
Date   Sun, 9 Oct 2011 16:50:23 +0530

Hello all

I am working with a polled cross section data of firm from different
states of India on STATA 10. I want to generate a variable sales_m
where sales_m is mean sale of firms in a industry within a state. Now
I use this command

egen sales_m = mean(sales), by (state industry)

Now I have this boubt that, am I writing the syntex correctly or not
to creat the variable correctly.

Please help

Prakash
*
*   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