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: Making permutations of dyads


From   Douglas Levy <douglas_levy@post.harvard.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Making permutations of dyads
Date   Thu, 19 Dec 2013 15:10:39 -0500

Actually, to correct my initial post, I'd be interested in
*combinations* not *permutations*. So to restate and revise:
ID    time  5m_block
1     8:00  1
2     8:02  1
3     8:02  1
4     8:04  1
5     8:06  2
6     8:07  2
7     8:09  2

For 5 minute time blocks,  I'd want to output a dataset that looks like this:
Dyad
12
13
14
23
24
34
56
57
67

For 5m bands, I'd want:
Dyad
12
13
14
23
24
25
34
35
45
46
56
57
67


On Thu, Dec 19, 2013 at 2:29 PM, Douglas Levy
<douglas_levy@post.harvard.edu> wrote:
> Hi All,
> I'm trying to create a dataset of all paired permutations of subject
> IDs within time blocks or alternatively time bands. My data look like
> this:
> ID    time  5m_block
> 1     8:00  1
> 2     8:02  1
> 3     8:02  1
> 4     8:04  1
> 5     8:06  2
> 6     8:07  2
> 7     8:09  2
>
> For 5 minute time blocks,  I'd want to output a dataset that looks like this:
> Dyad
> 12
> 13
> 14
> 21
> 23
> 24
> 31
> 32
> 34
> 56
> 57
> 65
> 67
> 75
> 76
>
> For 5m intervals, I'd want:
> Dyad
> 12
> 13
> 14
> 21
> 23
> 24
> 25
> 31
> 32
> 34
> 35
> 41
> 42
> 43
> 45
> 46
> 52
> 53
> 54
> 56
> 57
> 64
> 65
> 67
> 75
> 76
>
> Thanks for any/all suggestions!
> -Doug
> *
> *   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