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: pooling again
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: pooling again
Date
Sat, 17 Aug 2013 14:48:31 +0100
There is a -summarize- command (which can be abbreviated -sum-), a
-sum()- function and an -egen- function -sum()-, so it is not clear
which sandpit you're playing in.
http://www.stata.com/support/faqs/data-management/creating-variables-recording-properties/
is an attempt at a systematic survey. The easiest trick, which has a
"Yes, of course!" flavour if you miss it, is just
sum of others = sum of all - this value
and under -by:- that can still be about two commands.
You don't seem to be doing quite that, as there is talk of several
variables too.
If you don't get a better answer, you may need to show data and/or
code. Just words can be pretty difficult for others to grasp.
Nick
[email protected]
On 17 August 2013 14:22, Andrew Reed <[email protected]> wrote:
> I have 79 unique entity identifiers that correspond to different banks and countries. I currently have an event dummy variable coded for each entity and would like to create a modified form of this. The form I would like is the sum all of the events for all of the entities outside of the one entity the variable is being formed for.
>
> An example. In creating this new variable for Sweden, I would include all of the events for countries that are not Sweden. Then going to the next entity, let's say SEB bank, I would include all of the events that are not SEB bank, thus Swedish events would be included in this variable for SEB Bank but not for Sweden itself. I hope that makes sense. But it would go on and on.
>
> I'm playing around with the sum command as well as playing with the numerical identifiers but if someone has a quick and obvious answer I would greatly appreciate this.
>
> Sincerely,
>
> Andrew Wilson Reed
>
>
> *
> * 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/
*
* 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/