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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: How do I produce a dataset based on all possible *triplets* of identifiers within each group?


From   K Jensen <k.x.jensen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How do I produce a dataset based on all possible *triplets* of identifiers within each group?
Date   Fri, 12 Aug 2011 14:29:24 +0100

Hi--thanks for the comments on this. For the record, I found that the
easiest thing was to cross the paired dataset with the original (after
renaming) and then to do some judicious dropping.

Thankyou again

Karin

On 11 August 2011 17:54, Austin Nichols <austinnichols@gmail.com> wrote:
> Karin Jensen <k.x.jensen@gmail.com>:
> Induction.  You can do it once for one pair of identifiers, then do
> egen firstpair=group(id1 id2)
> to make a new single id, and repeat using firstpair and id3.
>
> But see -help cross-
>
> On Thu, Aug 11, 2011 at 12:40 PM, K Jensen <k.x.jensen@gmail.com> wrote:
>> Hello Statalisters
>>
>> I would like to use similar techniques to this excellent article by
>> Nick Cox to generate all possible *triplets* within a group rather
>> than pairs :- http://www.stata.com/support/faqs/data/pairs.html
>>
>> I am not being very smart here but I can't see how to generalize this.
>> Could anyone give me any tips?
> *
> *   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/
>

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