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 at the end of May, 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   Austin Nichols <austinnichols@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   Thu, 11 Aug 2011 12:54:06 -0400

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index