![Page 1: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/1.jpg)
SOCIAL NETWORK ANALYSIS
USING STATA
10 June 2016
German Stata User Meeting
GESIS, Cologne
Thomas Grund
University College Dublin
www.grund.co.uk
![Page 2: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/2.jpg)
![Page 3: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/3.jpg)
NETWORK DYNAMICS
International art fairs
Changes 2005 - 2006
Yogev, T. and Grund, T. (2012) Structural Dynamics and the Market for Contemporary Art: The Case
of International Art Fairs. Sociological Focus, 54(1), 23-40.
![Page 4: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/4.jpg)
CO-OFFENDING
IN YOUTH GANG
Grund, T. and Densley, J. (2012) Ethnic Heterogeneity in the Activity and Structure of a Black Street
Gang. European Journal of Criminology, 9(3), 388-406.
Grund, T. and Densley, J. (2015). Ethnic homophily and triad closure: Mapping internal gang structure
using exponential random graph models. Journal of Contemporary Criminal Justice, 31(3), 354–370
Caribbean East Africa UK West Africa
![Page 5: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/5.jpg)
MANCHESTER UTD –
TOTTENHAM
9/9/2006, Old Trafford
Grund, T. (2012) Network Structure and Team Performance: The Case of English
Premier League Soccer Teams. Social Networks, 34(4), 682-690.
![Page 6: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/6.jpg)
SOCIAL NETWORKS
• Social
• Friendship, kinship, romantic relationships
• Government
• Political alliances, government agencies
• Markets
• Trade: flow of goods, supply chains, auctions
• Labor markets: vacancy chains, getting jobs
• Organizations and teams
• Interlocking directorates
• Within-team communication, email exchange
![Page 7: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/7.jpg)
DEFINITION
Mathematically, a (binary) network is defined as 𝐺 = 𝑉, 𝐸where 𝑉 = 1,2, . . , 𝑛 is a set of “vertices” (or “nodes”) and 𝐸 ⊆𝑖, 𝑗 | 𝑖, 𝑗 ∈ 𝑉 is a set of “edges” (or “ties”, “arcs”). Edges are
simply pairs of vertices, e.g. 𝐸 ⊆ 1,2 , 2,5 … .
We write 𝑦𝑖𝑗 = 1 if actors 𝑖 and 𝑗 are related to each other (i.e.,
if 𝑖, 𝑗 ∈ 𝐸), and 𝑦𝑖𝑗 = 0 otherwise.
In digraphs (or directed networks) it is possible that 𝑦𝑖𝑗 ≠ 𝑦𝑗𝑖.
![Page 8: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/8.jpg)
ADJACENCY MATRIX
![Page 9: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/9.jpg)
ADJACENCY MATRIX
![Page 10: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/10.jpg)
ADJACENCY LIST
![Page 11: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/11.jpg)
ADJACENCY LIST
![Page 12: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/12.jpg)
NETWORK ANALYSIS
- Simple description/characterization of networks
- Calculation of node-level characteristics (e.g. centrality)
- Components, blocks, cliques, equivalences…
- Visualization of networks
- Statistical modeling of networks, network dynamics
- ….
![Page 13: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/13.jpg)
. findit nwcommands
http://nwcommands.org
![Page 14: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/14.jpg)
http://nwcommands.org
![Page 15: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/15.jpg)
Twitter: nwcommands
GoogleGroup: nwcommands
Search “nwcommands” to find a
channel with video tutorials.
![Page 16: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/16.jpg)
NWCOMMANDS
• Software package for Stata. Almost 100 new Stata commands
for handling, manipulating, plotting and analyzing networks.
• Ideal for existing Stata users. Corresponds to the R packages
“network”, “sna”, “igraph”, “networkDynamic”.
• Designed for small to medium-sized networks (< 10000).
• Almost all commands have menus. Can be used like Ucinet
or Pajek. Ideal for beginners and teaching.
• Not just specialized commands, but whole infrastructure for
handling/dealing with networks in Stata.
• Writing own network commands that build on the
nwcommands is very easy.
![Page 17: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/17.jpg)
LINES OF CODE
Type Files LoC
.ado 94 14548
.dlg 57 5707
.sthlp 97 9954
DownloadsOver 13 000 (since Jan
2015)
![Page 18: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/18.jpg)
. nwinstall, all
![Page 19: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/19.jpg)
![Page 20: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/20.jpg)
. help nwcommands
![Page 21: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/21.jpg)
INTUITION
• Software introduces netname and netlist.
• Networks are dealt with like normal variables.
• Many normal Stata commands have their network counterpart
that accept a netname, e.g. nwdrop, nwkeep, nwclear,
nwtabulate, nwcorrelate, nwcollapse, nwexpand, nwreplace,
nwrecode, nwunab and more.
• Stata intuition just works.
![Page 22: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/22.jpg)
SETTING NETWORKS
• “Setting” a network creates a network quasi-object that has a
netname.
• After that you can refer to the network simply by its netname,
just like when refer to a variable with its varname.
Syntax:
![Page 23: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/23.jpg)
![Page 24: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/24.jpg)
![Page 25: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/25.jpg)
LIST ALL NETWORKS
Check out the return vector. Both
commands populate it as well.
These are the names of the
networks in memory. You can
refer to these networks by
their name.
![Page 26: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/26.jpg)
LOAD NETWORK
FROM THE INTERNET
. help netexample
![Page 27: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/27.jpg)
IMPORT NETWORK
• A wide array of popular network file-formats are supported, e.g. Pajek, Ucinet, by nwimport.
• Files can be imported directly from the internet as well.
• Similarly, networks can be exported to other formats with nwexport.
![Page 28: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/28.jpg)
DROP/KEEP NETWORKS
• Dropping and keeping networks works almost exactly like
dropping and keeping variables.
![Page 29: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/29.jpg)
![Page 30: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/30.jpg)
DROP/KEEP NODES
You can also drop/keep nodes of a specific network.
![Page 31: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/31.jpg)
NODE ATTRIBUTES
• Every node of a network has a nodeid, which is matched with the
observation number in a normal dataset.
• In this case, the node with nodeid == 1 is the “acciaiuoli” family and they
have a wealth of 10.
![Page 32: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/32.jpg)
nwset nwdrop
nwds nwkeep
nwcurrent
nwimport
webnwuse
![Page 33: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/33.jpg)
![Page 34: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/34.jpg)
![Page 35: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/35.jpg)
. webnwuse gang
. nwplot gang, color(Birthplace) scheme(s2network)
![Page 36: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/36.jpg)
nwplot gang, color(Birthplace) symbol(Prison) size(Arrests)
![Page 37: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/37.jpg)
acciaiuoli
albizzi
barbadori
bischeri
castellani
ginori
guadagni
lamberteschi
medici
pazzi
peruzzi
pucci
ridolfi
salviati
strozzi
tornabuoni
. webnwuse florentine
. nwplot flomarriage, lab
![Page 38: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/38.jpg)
. nwplotmatrix flomarriage, lab
![Page 39: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/39.jpg)
. nwplotmatrix flomarriage, sortby(wealth) label(wealth)
![Page 40: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/40.jpg)
. webnwuse klas12
. nwmovie klas12_wave1-klas12_wave4
![Page 41: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/41.jpg)
![Page 42: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/42.jpg)
. nwmovie _all, colors(col_t*) sizes(siz_t*) edgecolors(edge_t*)
![Page 43: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/43.jpg)
nwplot
nwplotmatrix
nwmovie
![Page 44: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/44.jpg)
![Page 45: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/45.jpg)
SUMMARIZE
![Page 46: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/46.jpg)
SUMMARIZE
![Page 47: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/47.jpg)
TABULATE NETWORK
![Page 48: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/48.jpg)
TABULATE TWO NETWORKS
![Page 49: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/49.jpg)
TABULATE NETWORK
AND ATTRIBUTE
![Page 50: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/50.jpg)
DYAD CENSUS
M: mutual
A: asymmetric
N: null
![Page 51: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/51.jpg)
![Page 52: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/52.jpg)
nwsummarize
nwtabulate
nwdyads
nwtriads
![Page 53: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/53.jpg)
![Page 54: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/54.jpg)
TABULATE NETWORK
![Page 55: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/55.jpg)
RECODE TIE VALUES
![Page 56: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/56.jpg)
FLORENTINE FAMILIES
Marriage ties Business ties
![Page 57: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/57.jpg)
REPLACE TIE VALUES
![Page 58: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/58.jpg)
. help nwreplace
![Page 59: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/59.jpg)
GENERATE NETWORKS
![Page 60: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/60.jpg)
. help nwgen
![Page 61: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/61.jpg)
nwrecode
nwreplace
nwsync
nwtranspose
nwsym
nwgen
![Page 62: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/62.jpg)
![Page 63: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/63.jpg)
FLORENTINE FAMILIES
Who are the
neighbors?
![Page 64: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/64.jpg)
NEIGHBORS
![Page 65: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/65.jpg)
NEIGHBORS
![Page 66: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/66.jpg)
CONTEXT
![Page 67: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/67.jpg)
CONTEXT
What is the average wealth of the “albizzi’s” network neighbors?
![Page 68: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/68.jpg)
CONTEXT
![Page 69: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/69.jpg)
CONTEXT
![Page 70: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/70.jpg)
nwneighbor
nwcontext
![Page 71: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/71.jpg)
![Page 72: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/72.jpg)
DISTANCE
Length of a shortest connecting path defines the (geodesic)
distance between two nodes.
![Page 73: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/73.jpg)
DISTANCE
𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑠 =
0 1 11 0 21 2 0
2 21 13 3
1 2 22 1 3
0 31 0
3
1 2
4
5
𝑎𝑣𝑔𝑒𝑟𝑎𝑔𝑒 𝑠ℎ𝑜𝑟𝑡𝑒𝑠𝑡 𝑝𝑎𝑡ℎ 𝑙𝑒𝑛𝑔𝑡ℎ = 1.8
![Page 74: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/74.jpg)
DISTANCE
![Page 75: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/75.jpg)
DISTANCE
![Page 76: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/76.jpg)
PATHS
How can one get from
the “peruzzi” to the
“medici”?
![Page 77: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/77.jpg)
PATHS
![Page 78: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/78.jpg)
PATHS
![Page 79: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/79.jpg)
PATHS
![Page 80: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/80.jpg)
nwgeodesic
nwpath
nwplot
![Page 81: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/81.jpg)
![Page 82: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/82.jpg)
CENTRALITY
Well connected actors are in a
structurally advantageous position.
• Getting jobs
• Better informed
• Higher status
• …
What is “well-connected?”
![Page 83: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/83.jpg)
DEGREE CENTRALITY
Degree centrality
• Simply the number of incoming/outgoing ties => indegree
centrality, outdegree centrality
• How many ties does an individual have?
𝐶𝑜𝑑𝑒𝑔𝑟𝑒𝑒 𝑖 =
𝑗=1
𝑁
𝑦𝑖𝑗 𝐶𝑖𝑑𝑒𝑔𝑟𝑒𝑒 𝑖 =
𝑗=1
𝑁
𝑦𝑗𝑖
![Page 84: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/84.jpg)
BETWEENNESS CENTRALITY
Betweeness centrality
• How many shortest paths go through an individual?
a
e
b
c
d
𝐶𝑏𝑒𝑡𝑤𝑒𝑒𝑛𝑛𝑒𝑠𝑠 𝑎 = 6
…
𝐶𝑏𝑒𝑡𝑤𝑒𝑒𝑛𝑛𝑒𝑠𝑠 𝑏 = 0
![Page 85: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/85.jpg)
BETWEENNESS CENTRALITY
Betweeness centrality
• How many shortest paths go through an individual?
a
e
b
c
d
e
What about multiple shortest paths?
E.g. there are two shortest paths
from c to d (one via a and another
one via e)
Give each shortest path a weight inverse to
how many shortest paths there are
between two nodes.
![Page 86: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/86.jpg)
![Page 87: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/87.jpg)
nwdegree
nwbetween
nwevcent
nwcloseness
nwkatz
![Page 88: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/88.jpg)
![Page 89: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/89.jpg)
RANDOM NETWORK
nwrandom 15, prob(.1)
Each tie has the same probability to exist, regardless of any other ties.
nwrandom 15, prob(.5)
![Page 90: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/90.jpg)
LATTICE RING LATTICE
nwlattice 5 5 nwring 15, k(2) undirected
![Page 91: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/91.jpg)
SMALL WORLD NETWORK
nwsmall 10, k(2) shortcuts(3) undirected
![Page 92: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/92.jpg)
PREFERENTIAL
ATTACHMENT NETWORK
nwpref 10, prob(.5)
![Page 93: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/93.jpg)
HOMOPHILY NETWORK
nwhomophily gender, density(0.05) homophily(5)
![Page 94: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/94.jpg)
nwrandom nwlattice
nwsmall nwpref
nwring
nwhomophily
nwdyadprob
![Page 95: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/95.jpg)
![Page 96: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/96.jpg)
Is a particular
network pattern
more (or less)
prominent than
expected?
![Page 97: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/97.jpg)
Question: Is there more or less correlation
between these two networks than expected?
𝑐𝑜𝑟𝑟𝑜𝑏𝑠 = 0.372
![Page 98: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/98.jpg)
Test-statistic
𝑐𝑜𝑟𝑟𝑜𝑏𝑠 = 0.372
Distribution of test-
statistic under null
hypothesis
𝑐𝑜𝑟𝑟𝑟𝑎𝑛𝑑𝑜𝑚 =? ?
1
2
![Page 99: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/99.jpg)
QUADRATIC ASSIGNMENT
PROCEDURE
Scramble the network by permuting the actors
(randomly re-label the nodes), i.e. the actual
network does not change, however, the position
each node takes does.
Re-calculate the test-static on the
permuted networks and compare
it with test-statistic on the
unscrambled network.
Network structure is
‘controlled’ for. Keeps
dependencies.
![Page 100: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/100.jpg)
PERMUTATION TEST
permutation
- 1 0 1
1 - 1 1
0 0 - 0
0 0 0 -
1
2
3
4
43
1
2
- 1 1 1
0 - 0 0
1 1 - 0
0 0 0 -
![Page 101: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/101.jpg)
GRAPH CORRELATION
nwcorrelate flobusiness flomarriage, permutations(100)
01
23
4
de
nsity
-.2 0 .2 .4correlation
based on 100 QAP permutations of network flobusiness
Corr(flobusiness, flomarriage)
![Page 102: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/102.jpg)
nwcorrelate
nwpermute
nwqap
nwergm
![Page 103: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/103.jpg)
SOCIAL NETWORK ANALYSIS
USING STATA
10 June 2016
German Stata User Meeting
GESIS, Cologne
Thomas Grund
University College Dublin
www.grund.co.uk
![Page 104: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/104.jpg)
![Page 105: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/105.jpg)
ERGM
logit 𝑃 𝑌𝑖𝑗 = 1 𝑛 𝑎𝑐𝑡𝑜𝑟𝑠, 𝑌𝑖𝑗𝑐 =
𝑘=1
𝐾
𝜃𝑘𝛿𝑠𝑘 𝒚
Probability that
there is a tie from i
to j. Given, n actors AND the rest
of the network, excluding the
dyad in question!
𝑌𝑖𝑗𝑐 = all dyads other than 𝑌𝑖𝑗
Amount by which the feature
𝑠𝑘 𝑦 changes when 𝑌𝑖𝑗 is
toggled from 0 to 1.
![Page 106: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/106.jpg)
ERGM
𝑃 𝒀 = 𝒚 𝜃 =𝑒
𝜃𝑇𝑠 𝒚
𝑐 𝜃
𝒀 = 𝒓𝒂𝒏𝒅𝒐𝒎 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆, a randomly selected network from
the pool of all potential networks
𝒚 = 𝒐𝒃𝒔𝒆𝒓𝒗𝒆𝒅 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆, here observed network
Probability to draw
‘our’ observed
network y from all
potential networks
A score given to our
network y using some
parameters 𝜃 and the
network features s of y
𝜽 = 𝒑𝒂𝒓𝒂𝒎𝒆𝒕𝒆𝒓𝒔, to be estimated
A score given to all
other networks we
could have observed
![Page 107: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/107.jpg)
ERGM: INTEPRETATION
ERGM’s ultimately give you an estimate for various
parameters 𝜃𝑘, which mean…
If a potential tie 𝑌𝑖𝑗 = 1
(between i and j) would
change the network
statistic 𝑠𝑘 by one unit.
This changes the log-
odds for the tie 𝑌𝑖𝑗 to
actually exist by 𝜃𝑘.
![Page 108: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/108.jpg)
EXAMPLE
Consider an ERGM for an undirected network with parameters for these
three statistics:
𝑠𝑒𝑑𝑔𝑒𝑠 𝑦 =𝑦𝑖𝑗
𝑠2𝑠𝑡𝑎𝑟𝑠 𝑦 =𝑦𝑖𝑗 𝑦𝑖𝑘
𝑠𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒𝑠 𝑦 = 𝑦𝑖𝑗 𝑦𝑗𝑘𝑦𝑖𝑘
1) number of edges
2) number of 2-stars
3) number of triangles
𝑃 𝒀 = 𝒚 𝜃 ∝ 𝑒𝜃𝑒𝑑𝑔𝑒𝑠𝑠𝑒𝑑𝑔𝑒𝑠 𝑦 + 𝜃2𝑠𝑡𝑎𝑟𝑠𝑠2𝑠𝑡𝑎𝑟𝑠 𝑦 + 𝜃𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒𝑠𝑠𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒𝑠 𝑦
Then the 3-parameter ERG distribution function is:
![Page 109: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/109.jpg)
![Page 110: SOCIAL NETWORK ANALYSIS USING STATA · 2016. 6. 13. · Social Networks, 34(4), 682-690. SOCIAL NETWORKS ... Ideal for beginners and teaching. • Not just specialized commands, but](https://reader034.vdocuments.us/reader034/viewer/2022051923/601121a69ebc1876ef1b7ad6/html5/thumbnails/110.jpg)
SOCIAL NETWORK ANALYSIS
USING STATA
10 June 2016
German Stata User Meeting
GESIS, Cologne
Thomas Grund
University College Dublin
www.grund.co.uk