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: pooling again


From   Andrew Reed <[email protected]>
To   [email protected]
Subject   Re: st: pooling again
Date   Sat, 17 Aug 2013 16:03:41 +0200

I have been able to collapse all event observations for all 79 entities into one course through the time series. As it is panel data I'm working with I have 79 different runs of the same 4083 daily observations. A modified version of what I've been trying is kind of what I need...

collapse (max) event2, by (date) 

where I am able to exclude event counts per their id labels. I'm assuming an 'if' statement would work for this a la 

collapse (max) event2, by (date) if id!=1

meaning that all event measures are grouped together for groups 2-79.

Hope this specification helps get my goal across.

Drew

Den 17/08/2013 kl. 15.48 skrev Nick Cox:

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


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