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]
st: Re: how to convert long data into set of ties
From
Caleb Southworth <[email protected]>
To
[email protected]
Subject
st: Re: how to convert long data into set of ties
Date
Fri, 5 Oct 2012 15:42:15 -0700
OK, sorry, now I will answer my own question. I see I can make a set
of edges by using -joinby-
Covered here http://www.stata.com/meeting/chicago11/materials/chi11_miura.pdf
use authors.dta, clear
preserve
rename author link
save mags, replace
restore
joinby magazine using mags
* drop reciprocal ties
drop if author==link
* drop dups, could collapse and count
duplicates drop author link, force
list
| author link |
|----------------|
1. | Woolf Joyce |
2. | Woolf L |
3. | Joyce L |
4. | Joyce Woolf |
5. | L Joyce |
|----------------|
6. | L Woolf |
On Fri, Oct 5, 2012 at 2:38 PM, Caleb Southworth
<[email protected]> wrote:
> How can I make a set of dyads when two cases are linked by a third value in
> common, for example, when authors publish in the same journal?
>
> So I have . list date-magazine
>
> +----------------------------+
> | date author magazine |
> |----------------------------|
> 1. | 1920 Woolf Dial |
> 2. | 1921 Woolf Mercury |
> 3. | 1930 Woolf Nation |
> 4. | 1925 Joyce Dial |
> 5. | 1930 Joyce Transition |
> |----------------------------|
> 6. | 1927 L Dial |
> 7. | 1930 L Transition |
> +----------------------------+
>
> And the desired outcome would be:
>
> Woolf Joyce
> Woolf L
> Joyce Woolf
> Joyce L
> L Woolf
> L Joyce
>
> That is the pairs of who published in the same journal. It seems like a
> reshape problem. Thanks.
*
* 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/