Bookmark and Share

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


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

st: Calculating group average of the other group I am not a member of


From   Özgür Gürerk <[email protected]>
To   <[email protected]>
Subject   st: Calculating group average of the other group I am not a member of
Date   Tue, 11 Mar 2014 18:18:52 +0100

Dear All,

In my data, subjects can belong either to community==1 or to
community==2 in a given period.

For subject i, I can calculate for each period and group the average
of contributions of all members who belong to i's own community in
that period, the command below works fine for this:

by period group community, sort : egen float avgowncommunity =
mean((contribution))

How do I calculate the average contribution of the members of the
other community?

Thank you
Best
Özgür

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


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