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]

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


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Calculating group average of the other group I am not a member of
Date   Tue, 11 Mar 2014 17:24:02 +0000

This is an FAQ in every sense. See, for example, the thread earlier
today starting at
http://www.stata.com/statalist/archive/2014-03/msg00432.html

Nick
[email protected]


On 11 March 2014 17:18, Özgür Gürerk <[email protected]> wrote:
> 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?

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