Network Analysis ICPSR Ann Arbor, Summer 2015
1
LAB 1: Introducing Software and Getting Data Into UCINET IN THE ICPSR LAB COMPUTERS, YOU CAN FIND THE PROGRAM IN THE START MENU UNDER “ALL PROGRAMS” ->“STATISTICS?” -> “NETWORK ANALYSIS” -> “ANALYTIC TECHNOLOGIES.” LOCATE DATA IN Z:\mccranie. Getting Started with UCINET (This class uses Version 6.516.) 1. Each time you run an analysis, you must be prepared to make decisions about how you want UCINET to handle your data. Often the default option is NOT the one you need. Throughout the lab exercises, you will be prompted to choose the correct option. In real analysis, no one prompts you! So if you get results that look nonsensical or counterintuitive, check to make sure you had the correct options set. 2. You should become familiar with the UCINET User’s Guide and (even more conveniently) the HELP function on every dialog window. The HELP function should be your first line of defense.
3. Because UCINET generates at least one file (and sometimes many more) each time you run a statistical analysis, data management is a constant battle. Below you will find my suggestions for how to handle this on the lab computers. 4. If you download and use UCINET on your own computer, you will need to check the http://analytictech.com website regularly for program updates. Be aware that bugs, new options, etc., are regularly updated with the program. TO DO EVERY TIME YOU LOG INTO A COMPUTER IN A LAB TO USE UCINET:
You will need to tell UCINET where to look for the datasets and where to put the output. First, create a folder in a place where you have privileges. On lab machines, it is easiest to do this on the desktop or on a USB drive.
1. Go to FILE. Select CHANGE DEFAULT FOLDER. (You can create a new folder here.) 2. Go to OPTIONS. Select SCRATCH FOLDER. Leave it on WINDOWS TEMP FOLDER. 3. Go to OPTIONS. Select OUTPUT FOLDER.
You want to pick a folder that doesn’t have any spaces and nothing but numbers or letters in the word to avoid problems “NetworksData” works great but “ICPSR - Networks Data” could lead to problems.
Network Analysis ICPSR Ann Arbor, Summer 2015
2
Part 1: Opening UCINET
Please refer above to “Getting Started in UCINET” sheet for starting UCINET and changing your default, output, and scratch folders. You may have to repeat this every time you start the program on a lab machine.
Also - as you begin running routines in UCINET, you will be generating many output files. Often UCINET gives you the option of renaming those files. A good habit to begin now is renaming those output files something meaningful and consistent (perhaps with a prefix of the dataset name) so you can recognize them later. Loading a file into UCINET UCINET often uses an interface that can be initially a little confusing. To open a file in a menu, click on the “…” button beside the input.
Getting Social Network Data into UCINET
UCINET uses its own system file format for storing and reading data. It produces a pair of files with extensions .##h and .##d, which it then uses for analyses. The same format is used by NetDraw. There are a number of ways to get social network data into UCINET. Which one you use largely depends on the format (and size) of your data and your preferences for working with different text processing and spreadsheet programs. Here are a couple of useful approaches.
1. Enter the sociomatrix “by hand” in the UCINET spread sheet editor. You can also cut-and-paste data from Excel into the UCINET spread sheet editor.
Try entering the small matrix below by hand in UCINET. Look for the small box on the lower right side of the spreadsheet window and change the DIMENSIONS to 4 rows by 4 columns (because you have four actors).
Data Data Editor Matrix Editor
Network Analysis ICPSR Ann Arbor, Summer 2015
3
Name the file “byhand” by going to FILE->SAVE
Angie Nick Dave Natalie Angie 0 1 0 0 Nick 1 0 0 1 Dave 1 1 0 0 Natalie 1 1 1 0
Doublecheck your work by going to:
Find the byhand file and open it. You should see what you just entered.
2. Enter the sociomatrix in a text editor such as Textpad (no row or column labels).
Try entering the following in a simple text editor, such as Notepad or Textpad. (This can be found under “text editors” in the start menu. Single spaces or tabs between the columns should work. Name the file “texteditor.” Import it into UCINET and check your results with the Display function as you did with the previous section.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Import it into UCINET as “Raw.” Leave all the settings as they are. Note that we are using the old matrix
reader. The new one appears to be a bit buggy right now, but might be fixed in later updates
3. Enter the sociomatrix into Excel. (Found under Start-Microsoft Office.)
The first row and column should be blank or contain the labels for the rows and columns.
Try entering this dataset into Excel. Name it “exceleditor.”
Data Display
Data Import text file Raw Matrix OLD RAW Matrix
Readers
One Two Three Four
One 1 2 3 4
Two 5 6 7 8
Three 9 10 11 12
Four 13 14 15 16
Network Analysis ICPSR Ann Arbor, Summer 2015
4
After you import it, check your work through the Display function. 4. Enter the data as a “DL” file. “DL” is a data language that UCINET uses to define social network
data. It can be very helpful if you need to import large datasets. It is also very similar to many other software program’s default file formats, so data is often archived in text files that look very much like DL files.
A DL file is a text (ascii) file that you then import into UCINET, The first few lines of the DL file describe the data, the number of rows and/or columns in the matrix, the format of the data, and (optionally) give labels for the rows and/or columns. The data then follow. The on-line help file in UCINET describes DL commands in more detail. There are two especially useful formats. One reads a full sociomatrix and the other reads an “edgelist” format. For each, save the file as a text (ascii) file, and then import into UCINET as a “DL” file.
a. Full sociomatrix. DL format for a full sociomatrix including labels. Note, this file was created in a text editor and saved as a text file.
dl n=5 format = fullmatrix labels: jane,joe,jim,jeff,joan data: 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1
Data Import via Excel Matrices
Select your excel file, then indicate that your first rows and columns have labels. Choose only the first sheet (usually Excel creates three) and note at the bottom what the output will be.
Network Analysis ICPSR Ann Arbor, Summer 2015
5
0 1 0 1 0
Try entering this small sociomatrix into a DL format and name it “dlmatrix.” Import it into UCINET. Check your work with the Display function.
b. Edgelist. DL format for an edge list, labels are embedded in the file. After the "data:" line, each ordered pair is listed by name. Notice that there are no spaces in the names -- if you have spaces use quotation marks around the names. On each line the first actor is the sender and the second is the receiver of a tie. The number following sender and receiver labels is the value (optional) for the strength of the tie.
DL N=5 format = edgelist1 labels embedded: data: jane kim jane lee kim lee matt jane ned lee
Try entering this small sociomatrix into a DL format and name it "dledgelist." Import it into UCINET and check your work with the Display function. There is a very helpful set of DL instructions at the UCINET website: http://www.analytictech.com/networks/dataentry.htm
Hints for getting your data into a useful format 1. Microsoft Excel can be a very helpful way to enter data but once your network gets large, it’s very
unwieldy to enter data in an matrix format. Edgelists are you best bet. 2. If you have multiple relationships (such as friends, advice, supervise), you can enter them on separate
worksheets in an Excel workbook and import the entire set as one Excel workbook. It will recognize each sheet as a separate relationship – so make sure you give the sheets appropriate names on their tabs at the bottom of the screen.
3. DL files are most helpful for large files, but there are several other types of files that UCINET can
import. Explore the import menu for more options and consult the help files. 4. Once of UCINET’s many strengths is its robust import and export functions. If you are stumped on a
file format like edgelist, try exporting an example UCINET file in that format and then studying the output.
Data Import text file DL
Network Analysis ICPSR Ann Arbor, Summer 2015
6
Part 2: Basic Visualization in Netdraw
We will be using Netdraw, one of the three visualization packages available with UCINET. It can found in the same application folder as UCINET, or you can launch it from the “Visualize” menu in UCINET or by this shortcut button.
This program can use UCINET files (in addition to other types of files). You can open Netdraw from UCINET or by finding the program on your computer.
Netdraw allows you to represent attribute data while you are looking at networks. To do this you must first open the dataset:
You can then open the attribute data that goes along with it, for example, there are elementary school friendship data and they corresponding attribute data below:
1. Elementary School Friendships (find these data in the labs data folder, z:\mccranie)
Network File Name Attribute File Name Third.##h thirdsex.##h Fourth.##h fourthsex.##h Fifth.##h fifthsex.##h
Use Netdraw to draw graphs of friendship relationships between school children in three classrooms: third grade, fourth grade, and fifth grade. Use information about their sex (directions below) to color the points in the graph. Note that the attribute file has sex coded as 1 and 2, not male or female. Can you guess which sex is which?
To look at the attributes:
You will see a dialog box with options for colors. Choose some that you like to denote gender.
File Open UCINET Dataset
Network
File Open UCINET Dataset
AIribute Data
ProperMes Nodes Symbols Color AIribute-‐based
Network Analysis ICPSR Ann Arbor, Summer 2015
7
You can also change shapes. If you have multiple attributes that you are trying to show, using shapes and colors could be helpful.
Try different layout options under the LAYOUT menu. WARNING: The circle layout can be time-consuming.
FOR YOUR REFERENCE Getting information about actors into an attribute file can be done in several ways. Read the Netguide manual that comes with UCINET for more information about this. One way to get attribute data into Netdraw is to use an Excel spreadsheet and enter the data as a VNA text file. *node data id gender role “Larry David” male human “Mr Rocky Balboa” male dog “Mr Bojangles” female dog “Miss Colleen” female human The advantage to this method is that the values of the attributes do not have to be numeric, and thus are easier to identify in the Netdraw program. The disadvantage is that because the values are not numeric, they can not be used in UCINET for any type of analysis. There is also a node attribute editor where you can manually enter attribute information. This may only be useful when you have a small network to work with because it is time consuming and usually does not export to other programs. Spend some time playing with Netdraw using other datasets that are included in the data folder. The more comfortable you are with this, the more quickly you can complete your work in future labs. You can change the size of lines, remove the arrowheads (which can be very useful in undirected relations), color nodes, vary the size and shape of nodes, and generally manipulate the way the graphs appear.
ProperMes Nodes Symbols Shapes AIribute-‐based
The header goes on the first row. Column is on second.
Each actor has a row. Separate each column by a comma, tab, or space. Values that have spaces should be in quotation marks.
Network Analysis ICPSR Ann Arbor, Summer 2015
8
LAB 2: Notation, Graphs and Matrices Part 1: Basic Network Statistics in UCINET 1. Univariate Statistics
Data to use: Padgett’s Florentine Families, business and marriage relations: Padgb the business file Padgm the marriage file
ð First, open the networks in Netdraw and take a look. What do you notice about the networks? You will want to refer to these graphs as you work in UCINET.
ð Get basic network statistics about these networks in UCINET.
2. Density
ð Again, using the Padgett business and marriage relations
Tools Univariate Stats
What can the matrix staMsMcs tell you quickly? What can the row and columns tell you about actors? How does UCINET calculate the number of observaMons in a matrix? In univariate stats, what does the mean of the network correspond to?
Network Cohesion Density
Start with the business relation. Select “levels/layers/matrices” as the dimension you want to analyze
Repeat for the marriage relation; only select columns and rows for the dimension you are analyzing. Look at the Medici family (Number 9) each time.
Note: (new) Density Overall will give you the density measure and the number of ties; whereas Old Density Procedure will give you the density measure and the standard deviation (SD). Density by group will calculate the density value within and between groups.
Network Analysis ICPSR Ann Arbor, Summer 2015
9
3. Geodesic distances in an undirected graph
ð Find the geodesic distance between each pair of nodes in the Padgett marriage network. Refer again to Netdraw.
4. Geodesic distance in directed graphs
Network file names Third Third Grade Fifth Fifth Grade hospwork Psych Ward Staff – Work together hospfriend Psych Ward Staff – Friends
ð Open the two classroom networks (third and fifth) in Netdraw just to become familiar with them. Then, return to UCINET and find the average length between each pair of nodes. Write the values down.
ð Now, repeat the same for the two hospital ward staff relations (hospwork and hospfriend). The first is reported work relationships, while the second is reported friendship relations. Explore these networks in Netdraw before running the distance routine in UCINET. Jot down the average lengths again and compare.
Refer back to the univariate stats, what does the mean of the network (matrix) correspond to? Why?
Network Cohesion Geodesic Distances
Why are some distances missing?
Network Analysis ICPSR Ann Arbor, Summer 2015
10
Confused? This is a prime example of how the HELP button in UCINET can be quite useful. Use it!
ð Run the distance routine on hospwork again. Make sure you name your output dataset something meaningful. Inspect this dataset - you will use again in the next set of exercises. What could you suggest about the connectedness of these individuals based on your quick scan?
Part 2: Matrix Transformations in UCINET
You will often find that you must transform your data matrix in order to use it for a particular routine. You could transform the datasets using matrix algebra commands you can find in the supplementary assignments at the end of this document. However, UCINET has several simple routines available that will allow you to do routine transformations quickly. Again, you must take particular care in the naming of your output dataset; UCINET will rewrite over a previously created file unless you give them each unique names.
We will only use a few of the most basic transformations. However, there are many located in the "Transform" menu. If may want to experiment with them using your own datasets. 1. Dichotomizing valued data
Network file name daviswomen
Some routines (such as certain types of centrality) will not work appropriately with valued data, so you will need to dichotomize your dataset. While this is a very simple procedure, the definitional issues of what defines a relationship can be very important. You will need to pick an appropriate cut-off point for your relation that will define what becomes a zero and what becomes a one. In actual data analysis, no one will tell you where this point is - you will need to be guided by previous literature and an understanding of your relation - and you should be ready to defend your decision. The daviswomen file represents a symmetric sociomatrix with 18 southern women who attended at least one of 14 social events. The value of their relation is the number of parties they attended together. (This is a one-mode transformation of a classic two-mode affiliation dataset.) This number of shared events, in a sense, reflects the "strength" of their social ties.
Network Analysis ICPSR Ann Arbor, Summer 2015
11
But if you have to dichotomize this relation, where do you draw the line? Do you pick the average number of parties shared between women as your cutoff? Or, do you pick any shared party as an indicator of a tie? You could pick half of the maximum number of parties any two women attended. Each one will yield different results. Each one creates a different matrix - because you have defined the relationship differently. Start by examining the univariate statistics for the daviswomen file in UCINET. Write these values down the maximum and minimum values.
The average value of ties: __________ The maximum value is the highest value of a tie between two women: __________ The minimum is the lowest: __________ Before you begin the transformations below, open the dataset in Netdraw.Vary the width of the tie based on the tie strength by going to Properties -> Lines -> Size -> Tie Strength. Note that you can vary the scale of the widths. Use the “Rels” (relations) tab (in the upper right hand of the window) to "step" through the various tie values. You can also change the value of the line size to reflect tie strength under properties.
Below is an example of what it looks like to open the daviswomen.##h file in Netdraw and eliminate "weaker" (less valued ties) and dichotomized at a tie strength of greater than 3. I have circled the "Rels" tab box where you have your tie value entered. Where I have "3," you should just type "1." Then step through the ties values by clicking on the "+" sign right beside the number you just entered. Netdraw is in
Tools Univariate StaMsMcs
Select “matrices” as the dimension you want to analyze
Network Analysis ICPSR Ann Arbor, Summer 2015
12
effect dichotomizing for you. Play around with this until you eliminate all ties. What is the number? _________ How does it compare it the numbers you jotted down above? _____________________ Back to UCINET:
ð Determine each of the three above-mentioned types of cut-off values (average value of tie strength, any shared party, or half the maximum number of parties co-attended) using tools you have already used in UCINET. ð Then dichotomize daviswomen with each. Name each output file something different so that you can refer back to them if needed.
There is also a very helpful routine you can use in UCINET (TRANFORM>DICHOTOMIZE INTERACTIVE) in which you can see the differing results you could get from different cut points. 2. Symmetrizing directed data
Network file name fifth.##h
Some calculations (such as eigenvector centrality) also require a symmetrized dataset. If you provide an asymmetrical dataset, your data will be automatically symmetrized by counting a relational tie as present if either party says that it is. This is not a conservative assumption and you may wish to make a different one.
ð You may want to print out a copy of the original matrix for easier comparison. Symmetrize using the minimum method and compare to the original. Then try some of the other options, such as the sum and average. Try the Upper Half and Lower Half and the Upper Half>Lower Half.
Try to think about what the different symmetrizing assumptions mean for the definition of the relationship. How would you explain them in plain English? Why might you want to make a different set of assumptions than the default? The help button is very useful for these types of questions. 3. Dealing with a diagonal
Network file name daviswomen
For many routines in network analysis, choosing the self is an option, though it may not be a logical one.
Transform Dichotomize
Transform Symmetrize
Network Analysis ICPSR Ann Arbor, Summer 2015
13
For instance, in a symmetric relation where the value of the edge is equal to the number of parties that two people attend together, the value on the diagonal could equal the number of parties that the individual attended. For the most part (but not always!) choices on the diagonal are not of interest to the researcher. Most of UCINET's routines give you the option of choosing how the diagonal will be treated. However, you may wish to transform your entire diagonal based on a choice you have made.
ð Recode the diagonal in this network to zero. Check your work.
4. Unpacking datasets
Network file name SAMPSON
Often multiple relations are “stacked” on one another. To analyze a relation individually, you will need to separate the relations. This is relatively straightforward.
ð First, display the SAMPSON data and verify that it is multi-relational. Then unpack.
ð Check your work.
5. Joining datasets
Network file name hospwork hospfriend hosphard
Similarly, you may also need to stack multiple relations on one another for analysis. This is a little trickier.
ð Select your datasets in the order you would like them to appear and move them into the right hand window. Make sure you select “Matrices” as the dimension you would like to join. ð Run univariate stats on your newly joined file. You should see stats for each of the three relations.
This is also a useful routine when you would like to add a column of attribute information to a previously existing file. In that case, if you had a dataset of actor centralities, for instances, you could add that column to an existing attribute file. In that case, you would choose “columns” as the dimension you would add on.
Transform Diagonal
Data Unpack
Data Join
Network Analysis ICPSR Ann Arbor, Summer 2015
14
LAB 3: Centrality Part 1: Three archetypal graphs and centrality (refer to Wasserman and Faust, p. 171) In this exercise, you will import these three matrices from an Excel file, draw them in Netdraw to become familiar with them, and explore centrality measures. Star graph
N1 N2 N3 N4 N5 N6 N7 N1 0 1 1 1 1 1 1 N2 1 0 0 0 0 0 0 N3 1 0 0 0 0 0 0 N4 1 0 0 0 0 0 0 N5 1 0 0 0 0 0 0 N6 1 0 0 0 0 0 0 N7 1 0 0 0 0 0 0
Circle graph
N1 N2 N3 N4 N5 N6 N7 N1 0 1 0 0 0 0 1 N2 1 0 1 0 0 0 0 N3 0 1 0 1 0 0 0 N4 0 0 1 0 1 0 0 N5 0 0 0 1 0 1 0 N6 0 0 0 0 1 0 1 N7 1 0 0 0 0 1 0
Line graph
N1 N2 N3 N4 N5 N6 N7 N1 0 1 1 0 0 0 0 N2 1 0 0 1 0 0 0 N3 1 0 0 0 1 0 0 N4 0 1 0 0 0 1 0 N5 0 0 1 0 0 0 1 N6 0 0 0 1 0 0 0 N7 0 0 0 0 1 0 0
ð Import the starcircleline.xls file into UCINET from Excel. What you have created is a new file for UCINET that has all three relations joined together in it. Many routines in UCINET will allow you to run measures on joined files simultaneously, some will not.
Network Analysis ICPSR Ann Arbor, Summer 2015
15
ð Use the degree centrality for each using the joined file. Take note of high and low degree actors in each
ð Look at closeness centrality for each. Note: you cannot use this measure with a joined file, so you will have to UNPACK this joined file and look at each relation (star, circle, line) separately.
Look at betweenness centrality. Again, you will have to look at each network separately.
Part 2: Centrality in Different Types of Relations Non-directional Relations 1. Centrality for a graph (non-directional relation).
ð First, in NetDraw draw a graph of the network (remove the arrowheads). Which actors are the most prominent? ð Then, using Kite, look at the measures of centrality listed below.
Network Centrality & Power Degree
Network Centrality & Power Closeness
Network Centrality& Power Freeman Betweenness Node Betweeness
Network Centrality & Power Degree
Why can you keep the default opMon of “symmetric relaMon” here?
Network file name Kite
Remember there are many definitions of centrality that have been created. Be sure to refer back to your lecture notes or more importantly, click the “help” button when calculating centrality to ensure that you are using the correct centrality measure for your data.
Network Analysis ICPSR Ann Arbor, Summer 2015
16
How might different measures be useful to different research questions? (Look on Wasserman and Faust, Chapter 5, especially p. 215-19 for help.) Centrality for Padgett’s Florentine families business and marriage
ð Follow the same procedure on Padgett’s business and marriage networks.
2. Centrality for a directed relation: Krackhardt’s Advice Network
Joining files can be helpful when you would like to use a generated measurement of an actor as an attribute. For instance, if you would like to see how centrality is related to other attributes. If you have one set of attributes (age, tenure, etc) and you would like to add centrality indexes to that attribute, this is how you would do this.
Network file name Attribute file name KA (Krackhardt's advice network) kattributes (attributes file) ð First, open Netdraw and look at the relations (do not load the attribute data yet). Then, go back to UCINET and find the degree centrality for this relation as you did with the previous datasets. Note this time you should not keep this data as symmetric because it is a directed relation. Give the resulting dataset a new name. ð Then, join this newly created file to the attribute file using:
Network Centrality & Power Degree
Network Centrality& Power Freeman Betweenness Node Betweeness
Network Centrality and Power Closeness measures
What’s happening with the closeness centraliMes?
Data Join
Make sure you select "columns" as the dimension to join. Note that UCINET names your output file as JOINED. Look at your results. You should see 21 actors (rows) and eight columns of attributes.
Network Analysis ICPSR Ann Arbor, Summer 2015
17
Now, explore the similarities among the actor attributes and their centrality scores. Use:
Look again at the actors in Netdraw. Now load your new attribute file - your JOINED file. Change the size of the node to reflect the actor's normalized in-degree centrality. Change the color of the node to represent level.
HINT: Joining files can also be a very useful feature to append multiple relations into one file and generate results using all of them at once. 3. Centralities for directed relations: World trade data Now use the data on trade and diplomatic relations among countries from W&F. There are several relations (trade in basic manufactured goods, food, crude materials, minerals, and presence of diplomatic ties) and four attributes (GNP growth, population growth, secondary school enrollment ratio, and energy consumption per capita). We will be using just the mineral trade relation. Network file name Attribute file name Wmineral Wattributes
ð Find indegree and outdegree centralities for trade of minerals (WMINERAL). Do this by specifying that the data are not symmetric when selecting the degree centrality measure. Notice that UCINET saves the centrality measures in a file FreemanDegree, overwriting any previous FreemanDegree file you have created. You will want to rename this to something useful.
ð Investigate how centrality is associated with the attributes of the countries.
Tools SimilariMes
What can you say about the relaMonship between level and in-‐degrees? What about tenure? Please note that "level" indicates posiMon within the company. One is the highest level, two is middle, and three is the lowest level.
Look at the centralizaMon measures for this mineral trade network. What does the difference in centralizaMon for indegree and outdegree mean about the paIern of trade in minerals?
Make sure you select your JOINED file and use profile similarity -‐ correlation and similarity among columns.
Network Analysis ICPSR Ann Arbor, Summer 2015
18
Calculate correlations between the centrality measures and the attributes. First, merge the actor centrality measures and the actor attributes into a single data file by joining files.
Now, you can find correlations by using:
Choose correlation as the measure of profile similarity on the columns of your matrix of joined files (JOINED) from the previous step. 4. Eigenvector Centrality: hypothetical example ð Find the Eigenvector Centrality for the line graph. Note how close the values are for the top three nodes.
Eigenvector centrality for Zachary’s Karate club
These data show associations (symmetric) between members of a university karate club. The club split into two separate groups shortly after the data were
recorded. First draw a graph of the network. Which people seem to be most prominent? ð Find the eigenvector centralities for this network. Is anyone more or less central than you expected from looking at the graph? ð Compare the results using multiple centrality measures. You will encounter several choices of types of centrality here – pick them all and then use the help function to search for “Bonacich Power,” and “Reach centrality (k-reach).” Also, note the options for making this an undirected network. Unfortunately average reciprocal distance is not currently documented in UCINET, but Borgatti and Everett (2006), discusses it in concept. (“A Graph-theoretic perspective on centrality,” Social Networks)
Notice that UCINET saves the file zache-cent. You should open this file in DATA>MATRIX EDITOR to see the full file. You can use this file to get correlations (TOOLS>SIMILARITIES) between the different measures or to produce scatterplots for comparing pairs of measures
Data Join
Tools SimilariMes & Distances
Network Centrality Eigenvector
Network Centrality and Power MulMple measures
Network file name zache
Select the two files and use the “columns” option: wmineral file and wattributes
Network Analysis ICPSR Ann Arbor, Summer 2015
19
(TOOLS>SCATTERPLOT). Also note that while the “multiple measures” routine is a nice one, if you slip up and mislabel your relationship as undirected when it’s not, you won’t get a warning message. It will symmetrize your data for you and not tell you how! Now run the same routine with kite to generate a kite-cent file.
Here’s another way to consider these different centrality measures. Using the kite network, I imported the multiple measures file, imported it into Excel and ranked each actor by highest (1) to lowest (10) centrality values for each measure. Here’s my table. Note that Bayes and Savage swap the top spot. Why would this be for betweenness, specifically?
Part 3: Density Looking at a larger network Staff network in a hospital ward Network file name hospwork We work together hospfriend We are friends hosphard S/he gives me a hard time ð In NetDraw, draw a graph of the network. Use the “Ego” option in the Layout menu to look at
different ego-centered networks. You can “step” through individual nodes. Take note of central actors.
ð In UCINET find the density of each ego-centered network and look through the other statistics.
Tools ScaIerplot
Network Ego Networks Egonet Basic Measures
Select the small folder and open your kite-‐cent file. Use the x-‐axis and y-‐axis drop-‐down boxes to compare the different measures.
Network Analysis ICPSR Ann Arbor, Summer 2015
20
Network Cohesion Density Density Overall
Network Cohesion Reciprocity
Network Compare densiMes Paired (same nodes)
Given the nature of the Mes, do you see any surprises?
With this option you can look at two networks at a time – try work and friend.
Network Analysis ICPSR Ann Arbor, Summer 2015
21
Lab 4: Pajek Introduction
Pajek
Part 1: Getting started with Pajek
Locate Pajek to launch it from the start menu. This exercise refers heavily to datasets found on the Pajek website that accompany de Nooy, Mrvar, and Batagelj's Exploratory Social Network Analysis with Pajek (2005). The data for this lab comes from the Pajek website. http://vlado.fmf.uni-lj.si/pub/networks/data/esna/default.htm An expanded second edition (late 2011) is now available that uses most of the same datasets. http://vlado.fmf.uni-lj.si/pub/networks/book/esna2.htm If you plan to use Pajek extensively, this book is absolutely essential. The free manual, available at the website can also be helpful. This lab also refers heavily to the Pajek website (above), which contains a wealth of information. http://pajek.imfm.si/lib/exe/fetch.php?media=dl:pajekman301.pdf Part 2: Understanding Pajek’s file structures Pajek has seven basic file types, or “data objects.” Most of the menu structure depends on the type of data object you are considering. Therefore, you will need to become familiar with these objects and the format of files that they use.
1. Network (*.net) files are the most basic type of file. They contain information on the nodes, edges (undirected lines), and arcs (directed lines).
2. Partitions (*.clu) assign each node to a distinct class, cluster, or group (which is designated by an integer). Consider, for instance, gender. A partition on gender would identify a node as male (1) or female (2).
3. Permutations (*.per) are reordering of vertices. This does not change the structure of the network, but reordering can dramatically change the appearance of the matrix. This can be helpful if you are interested in seeing the density of relations in certain subgroups (as designated by the partition gender, for example.)
4. Clusters (*.cls) files designate subgroups of the larger network. This type of data object can be
Network Analysis ICPSR Ann Arbor, Summer 2015
22
useful if you wish to look only at a certain group of nodes in a larger network. 5. Hierarchy (*.hie) files allow individual nodes to belong to multiple partitions. This can be very
useful if you are trying to look at how nodes belong to successively smaller groups, such as the types that hierarchical clustering creates. (You will learn more about this in Chapter 12 of Wasserman and Faust.)
6. Vectors (*.vec) assign a numeric value to each node. These can be numbers with decimals. 7. Pajek Project Files (*.paj) are files that combine all desired elements of a network into one
singular file. This is a great way to save an entire “workspace” and come back to it later. (You access this through the FILE menu).
Now you will explore four of these object types to get an understanding of the way Pajek files are structured.
1. Network Files The following is a hypothetical network example for illustration purposes. You do not need to enter it. ------------------------------------- *Vertices 4 1 "Student1" 0.0 0.0 0.0 ic Red bc Black 2 "Student2" 0.0 0.0 0.0 ic Red bc Black 3 "Student3" 0.0 0.0 0.0 ic Red bc Black 3 "Student4" 0.0 0.0 0.0 ic Red bc Black *Arcs 1 2 3 c Green 2 3 5 c Black 3 4 2 c Blue *Edges 1 3 4 c Green ------------------------------------- In the example there are 4 vertices (Student1 through Student4) denoted by numbers 1, 2, 3 and 4. The nodes are red with a black border. The three zeroes beside each node indicate a starting layout, which can be changed in the draw program in Pajek.
There are three arcs (directed edges). The first number is the sending node, the second the receiving node. The third number is the weight of the tie and the color listed is the color of the tie.
Exploring the Draw Menu
ð Open the Dining Table Partners file (this is used in Chapter one in the ESNAP book) 1) in a text editor, such as Notepad or WordPad. Look at the structure of the file. You should see vertices and arcs. Note the differing starting layout numbers. ð Start Pajek and open this file in the Networks objects line. You do this by clicking on the folder icon to the left hand side of the “Networks” objects line. Select the dining room table data file. You could also navigate the file menu (FILE>NETWORK>READ). Then draw the network. (OLD VERSION: DRAW>DRAW)
Network Analysis ICPSR Ann Arbor, Summer 2015
23
This will bring you to a separate “Draw” window.
Choose:
ð This removes the labels and replaces them with numbers. You can use this same menu to replace the labels or drop them altogether. ð Spend some time experimenting with different layout options under the LAYOUT menu. Try the various options. ð Options>Colors will give you many choices about changing the color of the background, the vertices (nodes), edges (undirected lines), arcs (directed lines), the label colors, etc. Find a combination you like. ð Note that there are actually some 3D layouts. These will appear mostly flat on your screen (although if you look closely you will see that some nodes are slightly larger or smaller than others depending on their location on the z-axis) until you “spin” the image. To Spin, just go to the SPIN menu and watch the image spin 360 degrees. You can slow the image spin down by making the “spin in degrees” number very small. Experiment until you find a spin that is slow enough for you to get a good look at the network. ð If you wanted to hand draw an image, but still retain some structure, turn the “Grids” in the MOVE menu. When you have turned this on, any node you pull will be “snapped” to the nearest grid point. (Hint – you have to tell the program how many grid points you want. Switch between grid and circles and see what different shapes you can get.) ð When you have one that you like, go back to your Pajek main window and save your new network (you will be prompted for a new name.) Open this file in a text editor and compare it to your original file. You should see a number of differences in the first part of the network. These reflect many of the choices you just made for the layout!
2. Vector Files
ð Now open the world_trade.paj (Comes from ESNAP Chapter 2). This file comes in the form of a “Pajek Project file” which groups multiple Pajek files pertaining to the same dataset together. Remember you can only access this through the menu:
Hint: Project files area useful way, if you are manipulating one dataset and creating various partitions, cluster, and vector files to save them all together. You can also save each file individually.
Draw Network
OpMons Mark VerMces Using Numbers
File Pajek Project File Read
Network Analysis ICPSR Ann Arbor, Summer 2015
24
Then look at the data. Use: (OLD VERSION: DRAW-DRAW PARTITION)
Hey! Look – it saved your color choices from the previous image session. You can change them again. You will also have to adjust the size of the vertices using the options menu:
This is how you can use a vector file (remember, vectors have a meaningful value attached and are often continuous) to display attribute data in your network. After you close the draw window, keep this network and vector file open for the next step.
3. Partition Files
ð Select at the continents partitions (*.clu) file (the second one in the drop-down partitions menu – use the drop down arrow). One you have selected it, use the magnifying glass icon to take a quick look at the values of this attribute. These values are categorical – they only indicate that each country is on a particular continent. ð Go back to your draw menu and draw with vectors and partitions. Look at the results and note that Pajek preserves your previous scaling choice. (OLD VERSION: DRAW-PARTITION-VECTOR)
4. Project Files.
Look at the Padgett project file in Notepad. Note the two relations. Open the file in Pajek using
Note that it gives you one network file (which actually has two relations in it) and three vector files. If you are unsure of this, you can review the output in your REPORT window to see the multiple relations. Extract your joined relations. (OLD VERSION: NET>TRANSFORM>MULTIPLE RELATIONS)
When you get the chance to extract certain relations in a small dialogue box, enter 1-2. Note what happens in your networks objects line, you should have the multiple relations (original file) as well as separate files for the marriage and business networks. You must now choose which relation you wish to look at or work with.
Draw Network + First Vector
OpMons Size of VerMces (Autosize)
Draw Network+ First ParMMon + First Vector
File Pajek Project File Read
Network MulMple relaMons network Extract RelaMons
I recommend entering 0 and letting Pajek choose an optimal size and then tweaking from there. Experiment!
Network Analysis ICPSR Ann Arbor, Summer 2015
25
BEWARE: Pajek does not prompt you to save your work before closing, nor does it autosave a newly generated or edited data object. Many a tear has been shed over this lack of functionality when someone forgot this and just shut the program down. So, beware: you must save it if you want to keep it. In addition, Pajek saves data objects in memory, though it only actively uses the ones listed in the data objects lines. To free up memory, you may “dispose” of a data object in memory using the File (Network, dispose) menu. Choose the data type you are interested in and dispose of it. Closing Pajek and opening it up again will also clear memory, though you will lose what you haven’t saved! Part 2: Basic Network Analysis and Transformation in Pajek
Now that you are somewhat familiar with these new networks and the way Pajek works, you will repeat some of the same basic measures you have already learned in UCINET in Pajek. 1. Number of Nodes, Edges, and Arcs and Density
You can find out basic information about your network in several ways.
ð Using the Dining Table data, get the number of nodes, edges, arcs, and density of the dataset. When you are prompted to enter numbers, leave the value at 0. (OLD VERSION: INFO>NETWORKS)
2. Symmetrize Pajek has this functionality located in the transformation menu. You will need to either look at your new network in the draw menu or open the file in a text editor to verify your change. [Remember, edges are undirected, arcs are directed] (OLD VERSION: NET>TRANSFORM>EDGES->ARCS)
3. Centrality Degree Centrality is found in the menu: OLD VERSION: NET>PARTITIONS>DEGREE
ð Examine the output of this with the new vector file. (Remember the magnifying glass?) Now, draw this network again as you did in the beginning of this lab, but this time include the vector values. (Or partition, if you used the old version)
Network Info General
Network Create New Network Transform Arcs-‐> Edges
Network Create Vector Centrality Degree
Choose all.
Then pick your option – think about this carefully, do you want to symmetrize at min or max? How are these different?
Network Analysis ICPSR Ann Arbor, Summer 2015
26
Closeness and Betweenness ð Try other centrality types (Closeness and Betweenness) on the dining table network and look at your resulting vector files. Draw the network again using the centrality "attribute" vector and partition files. Vary node sizes on the values. A Few Extra Tips on Visualization in Pajek ð You can use a partition file to vary the size of your label file. To do this using degree centrality, convert the degree centrality vector file into a partition file. (NOTE: YOU DO NOT HAVE TO TAKE THIS STEP TO CREATE A PARTITION IF YOU WERE USING THE OLD VERSION OF PAJEK, AS DEGREE WAS ALREADY CREATED AS A PARTITION. ) VECTOR>MAKE PARTITION>BY INTERVALS>USE THRESHOLD AND STEP. Leave the threshold at 0 and the step at 1. This will create a partition file. Open that partition file in the third partitions object line. Then draw the image again with DRAW>NETWORK+FIRST VECTOR. Go to OPTIONS>SIZE>OF FONT>USE THIRD PARTITION FOR FONT SIZE. ð One of the major features of Pajek is that you can use the draw menu to export to a number of high resolution file types. Try this by using the EXPORT>2D>SVG>LABELS/EDGES/ARCS. This will create an html page and SVG file. Open this up and you will see an image that looks quite different than what you were looking at before. You can go back to the EXPORT>OPTIONS menu. Use this to change the scale of your nodes, to give them a 3D gradient, to alter the size or shape of nodes or lines. Experiment with these options! Once you get something pretty close to what you want, you can use a package like Adobe Illustrator (or freeware Inkscape) to edit the image further.
Network Analysis ICPSR Ann Arbor, Summer 2015
27
LAB 5: Affiliation Data
We’ve been looking at the daviswomen.##h dataset, as we noted this represents a symmetric sociomatrix with 18 southern women who attended at least one of 14 social events. The value of their relation is the number of parties they attended together. This number of shared events, in a sense, reflects the "strength" of their social ties. The two-mode dataset of women by social events is named “davis.##h” and can be found in your Data folder. In order to get centralities for this two-mode dataset in UCINET in newer versions of UCINET go to:
In some versions of centrality measures, you can calculate centrality if you first transform your affiliation matrix (women by events) into a bipartite matrix (women and events by women and events). To do this go to:
Your resulting matrix should look like:
Network 2-‐Mode Networks 2-‐Mode Centrality
Transform Graph TheoreMc BiparMte...
Network Analysis ICPSR Ann Arbor, Summer 2015
28
In order to get the centrality for this bipartite dataset you can run the centrality routines as you did for sociometric data.
Draw your bipartite network in Netdraw. You should get something like this.
Network Centrality and Power
Tools Univariate Stats
With the "columns" opMon specified for the Univariate Stats what is the Mean (that is, how did we get this number?)? the Sum? No. of obs?
Then specify the type of centrality you want.
Specify the option of “columns,” then “rows.” Use the davis dataset.
Network Analysis ICPSR Ann Arbor, Summer 2015
29
There’s also a way to transform your affiliation data into a one-mode network in UCINET:
You should also get some output, which has the values for the row and column coordinates, note that when you chose to do correspondence analysis you named your file something and like all UCINET routines you want to try to name these intuitive names or paste them into some research log in the interest of good data management.
Network Analysis ICPSR Ann Arbor, Summer 2015
30
LAB 6: Structural Density and Subgroups, Cliques, K-Plexes Part 1: Density and Subgroups
In NetDraw use the data on friendships between fifth graders (file: fifth). Also use the attribute file containing the sex of each student (file: fifthsex).
Look at the ties between and among the sexes. Note: Boys are coded as 1 and Girls are coded as 2. Node 10 in each of the three datasets is always a boy.
Color code gender:
In order to look at the “neighborhood” in which each node is (that is, looking only at those children that have ties to him/her) go to:
Scroll through using the “U” button at the bottom of the egonet layout box. Note that you can also chose the “EgoNetworks (New) routine, which allows you to expand an ego’s neighborhood k steps past first degree alters. (People you have a direct relationship with.)
Try this again for the third and fourth grade relations. Make sure you load the appropriate attribute files (again, coding genders separately).
How does the relationship between sex and friendship vary among the three groups? What do you observe about the ego-‐centered networks?
In UCINET start with the third grade network; find the density of the network.
You could also use “Old Density Procedure” here to get the standard deviation (SD) rather than the number of ties.
What does this density mean about the network as a whole?
ProperMes Nodes Symbols Color AIribute-‐based
Layout Ego Networks (simple)
Network Cohesion Density Density Overall
Network Analysis ICPSR Ann Arbor, Summer 2015
31
Find the density of ties within and between genders for the third graders. Repeat the density measure from above, but specify the partitioning genders in the attribute files.
The blocking vector allows you to specify which attribute you want the actors to be grouped on. If you had multiple attributes (multiple columns), you would need to know which column your attribute was in.
You can also do this using the previous density routine at:
Network Cohesion Density By Groups
Network Cohesion Density Old Density Procedure
Network Analysis ICPSR Ann Arbor, Summer 2015
32
What do the different densities mean about the relationship between sex and friendship for third graders?
In UCINET Use the “factions” routine to find a partition of the third grade network into two groups so that density is high within groups.
Note that the default number of blocks specified is 2. You can change this. Repeat for the fourth and fifth grades.
How do the “factions” correspond to the gender of the children? What does the number of errors in the output represent? NOW, Try this with the hospfriend dataset. [Make sure you load the attribute file hospattrib2.txt as a VNA text file]
Color the nodes by race. Now, go to the select nodes side window and pull down the menu. Choose race; deselect all groups and then select them one by one (in the nodes menu on the right, pick race and then select each group in turn):
Network Subgroups FacMons
Network Analysis ICPSR Ann Arbor, Summer 2015
33
Then color the lines by attributes (and pick race, I’ve chosen to make within group ties black and between group ties red, feel free to use colors of your choice):
What do you see about the patterning of each group? What do you see overall in the network when you look at all groups? In the select window under race, select only white and black. Note that the coding is: 1: White; 2: Black; 3: Asian; 9: missing. Now, go back up to the Select window, use the drop-down menu and select ID.
Network Analysis ICPSR Ann Arbor, Summer 2015
34
Scroll down to actor number 39. Deselect her. What happens to the appearance of the entire network after her removal? Go back to UCINET and look at the degree centrality (make sure you have noted that the data are not symmetric) for hospfriend.
What does the difference between in-degree and out-degree tell you? Again, focus on individual 39. Optional: try the attributes of sex and marital status.
What are your suspicions about friendship choices based on attribute data in these groups based on your visual inspection?
In UCINET find the density of friendship for the entire fifth grade network. Use:
What does this density value mean?
Find the density of ties among girls, among boys, and between girls and boys. Use:
And then specify the network “fifth” and “fifthsex” for the partition. Note that you can get the subgroup densities in UCINET in two ways – through the Network -‐> Cohesion -‐> Density by Groups routine or the Transform -‐> Aggregate -‐> Block routine. The Block routine gives you more options. See the help option for more information.
Network Centrality and Power Degree
Transform Aggregate (includes CSS) Block
Network Analysis ICPSR Ann Arbor, Summer 2015
35
What do you notice about the ties within and between genders? Repeat these steps for the hospfriend relation. Use the hospattrib.##h col 3 for the row and column partition. (It's slow and ugly, so be patient!) Note that the numeric values assigned in the attribute file is 1: White; 2: Black; 3: Asian; 9: missing.. Scroll down to the bottom and look at the reduced blockmatrix.
Keeping in mind that the network is much larger and the relations much less dense, what do you see? For the two individuals whose race is missing, which group do their densities of choices resemble?
Transform Aggregate (includes CSS) Block
Network Analysis ICPSR Ann Arbor, Summer 2015
36
Part 2: Visualization of Permuted Matrices in UCINET and Pajek
Particularly with a small network, it can be helpful to see the matrix reordered. A reordered matrix is isomorphic to the original matrix (all relationships are preserved), but the actors are placed in a new order based on their membership in a group (or a shared categorical attribute). UCINET will often reorder a matrix, as in the Transform -> Block command before. If you did not notice this, repeat it on the fifth grade network using gender as a partition. Pajek does not have the same subgroup density routines as UCINET. However, it does feature an easy way to permute (reorder) a dataset based on shared group/categorical attributes. A simple export command will allow you to look at the newly reordered matrix. Open fifth.net as a network in Pajek. Then open fifthsex.clu as a partition file. Now you will generate two matrix images. First, create an image of the original matrix.
Name this file matrix1.eps. Make sure it is saved in your lab folder or on the desktop! Pajek sometimes puts these files in strange places.
Now, reorder the network.
Note that you have created a new data object -‐ a permutation. Click on the "edit permutation" icon beside this new data object. You will see a list of the newly ordered vertices with the original number and the vertex label beside it. Finally, create an image of the permuted matrix
Name this file matrix2.eps (answer “Yes” if it asks you whether to draw lines according to the partition)
File Network Export Matrix to EPS Original
ParMMon Make PermutaMon
File Network Export Matrix to EPS Using Permuataion
Network Analysis ICPSR Ann Arbor, Summer 2015
37
You can either find the file and double-click it to open it in a viewer, or open up Microsoft Word. Insert the .eps files as a picture to inspect it:
Matrix1.eps [Before] Matrix2.eps [After]
Network Analysis ICPSR Ann Arbor, Summer 2015
38
Part 3: Subgroups and Cliques
First, use Netdraw to draw a graph of the business relation (file: PADGB). Identify the cliques in this graph. Repeat for the marriage relation (file: PADGM).
How many cliques are there? How large are they? Notice clique overlap.
In UCINET, find the cliques in the business and marriage relations. Use:
Check the graph to see that these are the cliques you previously identified. Here, I provide information for the marriage relations (PADGM)
Now, find cliques in the friendship relation for fifth graders. In order to run this analysis, you will need to “symmetrize” the relation to include only mutual ties, before finding the cliques. For the symmetrizing method, use minimum.
Why do you choose "minimum"? What would "maximum" tell you?
How is gender related to clique memberships? Do any cliques include both boys and girls?
Networks Subgroups Cliques
Network Analysis ICPSR Ann Arbor, Summer 2015
39
You might print out your clique output and an image of the fifth grade network to circle on your own. If you do this, you should get something like this:
Part 4: N-Cliques, K-Plexes
First draw a graph of the business relation (file: PADGB). Identify the cliques in this graph. Repeat for the marriage relation (file: PADGM) N-Cliques
a. In UCINET, find the 1-cliques in the business and marriage relations. Use:
Network Subgroups N-‐Cliques
Network Analysis ICPSR Ann Arbor, Summer 2015
40
b. Compare these to the cliques you previously identified. Circle them on the Netdraw graph you generated (as I did above with cliques. In order to figure out the number that corresponds with each family – remember they are labeled by name in Netdraw – display your data in UCINET, this will give you both the label and the node number).
c. Increase N to 2, and find the 2-cliques in the business and marriage relations.
d. Compare these to the 1-cliques.
K-Plexes
a. In UCINET, find the 1-plexes in the business and marriage relations. Use:
b. Compare these to the cliques you previously identified Networks Subgroups N-Cliques Networks Subgroups K-Plex
c. Increase K to 2, and find the 2-plexes in the business relation. Notice what happens when the minimum size is 3. Increase the minimum size to 4 and re-run the program.
d. Locate the 2-plexes on the graph of this relation.
e. Compare the 2-plexes to the 2-cliques.
Network Subgroups K-‐Plex
Network Analysis ICPSR Ann Arbor, Summer 2015
41
LAB 7: Blockmodeling Sampson’s Monastery Data
The following figure is from a classic social network analysis article, “Social Structure from Multiple Networks: I. Blockmodels of Roles and Positions,” by White, Boorman, and Brieger (1976). While it is not necessary, it would probably be most helpful for you to read through the article. You may want to refer to pages 749-754 for reference. Abstract from White, Boorman, and Brieger (1976):
Networks of several distinct types of social tie are aggregated by a dual model that partitions a population while simultaneously identifying patterns of relations. Concepts and algorithms are demonstrated in five case studies involving up to 100 persons and up to eight types of tie, over as many as 15 time periods. In each case the model identifies a concrete social structure. Role and position concepts are then identified and interpreted in terms of these new models of concrete social structure. Part II, to be published in the May issue of this Journal (Boorman and White 1976), will show how the operational meaning of role structures in small populations can be generated from the sociometric blockmodels of Part I.
In short, in his ethnographic account, Sampson described the changing social relationships among a group of monks. Over the course of time, the monks became divided into antagonistic groups. Sampson described them in as clustered in groups and holding particular roles:
Network Analysis ICPSR Ann Arbor, Summer 2015
42
Young Turks Loyal Opposition Outcasts Wavering Greg_2 (leader) Peter_4 (leader) Basil_3 Romul_10 John_1 (leader) Bonaven_5 (popular) Elias_17 Victor_8 Winf_12 (leader) Berth_6 (member) Simp_18 Amand_13 Hugh_14 (followers) Louis_11 (member) Boni_15 (followers) Ambrose_9 (less attached) Mark_7 (followers) Albert_16 (followers) First, display the sampson dataset and compare it to the blockmodels above. Notice that the actors have been renumbered to match the order they appear in the blockmodels above, but you can still see the numbering corresponding to the above blockmodels appended after each name. (So, Greg is represented by 2 in the images presented on the earlier page.) Then, unpack the dataset sampson. You will see a list of 10 files; these are all relational files for the monastery.
CONCOR (Structural Equivalence) Run the CONCOR model on a few of the following eight individual relations:
Dataset name Relationship Samplk3 Like Sampes Esteem Sampin Influence Samppr Praise Sampdlk Antagonism Sampdes Disesteem Sampnin Negative Influence Samnpr Blame In UCINET, use:
Load the data (make sure you push the “load” button) and then use the menu to “split” the network. You will see a set of instructions on the right part of the window. Try different combinations of splits. For instance, you can split once and get two groups and then split only one of those groups further, giving you three groups in total. Also examine the densities.
Data Unpack
Network Roles and PosiMons Structural CONCOR InteracMve
Network Analysis ICPSR Ann Arbor, Summer 2015
43
Now that you are familiar with CONCOR and the structure of this network, we are going to replicate as closely as possible the analysis with that from the original article. In order to do this we have to create a joined network file that includes the actual relations that the authors originally included. Go to DATA>JOIN and select the eight relations listed above. Make sure to join them as matrices and give your new file a new name. Repeat the CONCOR blockmodeling with your new joined file. This time, split the group into two. One group should have 8 nodes and the other should have 10. Split the one with 10 again. Examine the subgroup densities that are created with this three-group solution. Notice that you can look at the densities for each separate relation. For the positive affective relations, you should see that most groups have higher densities along the diagonal than off of it (members of each group tend to hold each other in higher esteem than outsiders) and the negative affect relations tend to have lower density along the diagonals. This reflects that CONCOR isn’t just finding where there are high in-group densities, but rather is getting at correlated patterns of choices. When you are finished examining your densities, save the output partition at the bottom of the Interactive CONCOR menu. Note the name of this partition – you will be using it again in a moment.
At Least one member of the monastery (Amand) will not appear in the same group that Boorman, Brieger and White identified. This could be due to their use of different program or come of the coding decisions they made that we did not replicate. However, what about the monk in question might lend him to be in a different group with a slightly different calculation? Look again at the list or the monks at the beginning of this exercise.
White, Boorman and Brieger didn’t use a density matrix to determine their image matrix (the small reduced matrix at the top of each of the separate relations), but you could. Make a decision about how you would draw your image matrix based on this density matrix. In order to do this you need to pick a cut-off point – what qualifies as “1” rather than a “0”. This is a decision each researcher must make for her/himself. In order to do this in UCINET, use TRANSFORM>AGGREGATE>BLOCK with your joined network file as your input dataset and the new partition file as the row/column partition. Once you have a new smaller image file, you could dichotomize at your chosen cutpoint by using TRANSFORM>DICHOTOMIZE.
Network Analysis ICPSR Ann Arbor, Summer 2015
44
In this lab, we will show you how you could recreate the image on the first page of this lab assignment. If you wanted, you could just strip all eight matrices beside one another. However, we are going to put a new twist on this matrix representation using a tool available in Pajek. Creating these images for all eight matrices would be time-consuming, so we will show you how to do this with one or two. How to create a Permuted matrix in Pajek based on Groups you have selected First, we need to export an individual relation from UCINET to PAJEK:
You should be able to export the partitions file directly into Pajek. Unfortunately, that functionality is currently buggy, so we will have to create it ourselves. This shouldn’t be too hard. So, once we have opened the network file in in Pajek, we will create a null Partition file and fill the information in there.
Specify 18 actors and the constant number as 0. Then, edit the partition (reminder: use the edit icon underneath the PARTITIONS button). Save the partition file and give it a new name.
Then make this partition into a permutation (PARTITION>MAKE PERMUTATION) so you can export the matrix as an EPS file. Remember, again to save this. Then export it into an EPS. How to save EPS files in Pajek and then import them into Microsoft Word
Data Export Pajek Network
ParMMon Create Constant ParMMon
Network Analysis ICPSR Ann Arbor, Summer 2015
45
Name this file sampsonmatrix.eps (answer “Yes” when asked whether to draw lines according to the partition). Once you are in a new document in MICROSOFT WORD, you can bring the EPS files in the following way. Below is what you would get it you did all eight. Compare this to the original image from the first page of this lab.
File Network Export Matrix to EPS Using PermutaMon
Insert Picture From File
Like Esteem Influence Praise
Antagonism Disesteem Negative Influence Blame
Network Analysis ICPSR Ann Arbor, Summer 2015
46
Lab 8: Generalized Blockmodeling
For this assignment, you will use two hypothetical networks available to you in Pajek .net format. In the first, perfectblocks, the nodes were labeled with colors which match the “role” that the individual node plays. In this network, the Greens are chosen by themselves and by the Blues. The Blues are chosen by the Reds. No one chooses the Yellows or Reds. The matrix:
This hand-drawn graph shows the relationship between and among these groups of nodes:
Network Analysis ICPSR Ann Arbor, Summer 2015
47
ð Open up Pajek and open the perfectcolors network file. ð To run a blockmodel on this go to Network > Create Partition > Blockmodelling* (OLD VERSIONS: Operations > Blockmodeling) ð Deselect Restricted Options and Short Report. Then choose "Random Start" Click on the 2 clusters button and enter 4 clusters. (We know there are four clusters in this relation, because that’s how this hypothetical network was created.) Hit run. Look at your output in the report window. Yours might look slightly different, but it should look very similar to this: ::::BEGIN OUTPUT:::: Model2 description: Structural Equivalence
------------------------------------------------------------------------------
Matrix: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Green 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Green 2 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Green 3 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Blue 4 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Blue 5 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Blue 6 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Blue 7 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 8 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 9 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 10 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 11 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 12 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 13 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 14 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Error type: constant Minimal dom/fun/par size: 1 Averaging rule: 0-No, 1-Ave: 0
Tells you which type of model you just ran.
Your original matrix.
Network Analysis ICPSR Ann Arbor, Summer 2015
48
Weights, Priorities, Sequence 0 : 1.000 1 0 1 : 1.000 2 1 2 : 1.000 3 2 3 : 1.000 4 3 4 : 1.000 5 4 5 : 1.000 6 5 6 : 1.000 7 6 7 : 1.000 8 7 8 : 1.000 9 8 9 : 1.000 10 9 10 : 1.000 11 10 11 : 1.000 12 11 12 : 1.000 13 12 Density: 0.75000 0.50000 Image matrix definition: 1 2 3 4 ----------------------------------------------------------------------- 1: [ - com] [ - com] [ - com] [ - com] 2: [ - com] [ - com] [ - com] [ - com] 3: [ - com] [ - com] [ - com] [ - com] 4: [ - com] [ - com] [ - com] [ - com] Image matrix penalties: 1 2 3 4 ----------------------------------------------------------------------- 1: 1 1 1 1 2: 1 1 1 1 3: 1 1 1 1 4: 1 1 1 1 Equivalences 4: { 8 9 10 11 12 13 14 } { 4 5 6 7 } { 1 2 3 } { 15 16 17 18 19 20 21 22 23 24 } 7: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } 10: { 1 2 3 } { 4 5 6 7 } { 8 9 10 11 12 13 14 } { 15 16 17 18 19 20 21 22 23 24 } 13: { 8 9 10 11 12 13 14 } { 4 5 6 7 } { 1 2 3 } { 15 16 17 18 19 20 21 22 23 24 } 19: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } 25: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } 28: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } 31: { 4 5 6 7 } { 1 2 3 } { 8 9 10 11 12 13 14 } { 15 16 17 18 19 20 21 22 23 24 } 43: { 4 5 6 7 } { 8 9 10 11 12 13 14 } { 1 2 3 } { 15 16 17 18 19 20 21 22 23 24 } 49: { 1 2 3 } { 4 5 6 7 } { 8 9 10 11 12 13 14 } { 15 16 17 18 19 20 21 22 23 24 } Top Ten 4: { 8 9 10 11 12 13 14 } { 4 5 6 7 } { 1 2 3 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 7: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 10: { 1 2 3 } { 4 5 6 7 } { 8 9 10 11 12 13 14 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 13: { 8 9 10 11 12 13 14 } { 4 5 6 7 } { 1 2 3 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 19: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 25: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 28: { 8 9 10 11 12 13 14 } { 1 2 3 } { 4 5 6 7 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 31: { 4 5 6 7 } { 1 2 3 } { 8 9 10 11 12 13 14 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 43: { 4 5 6 7 } { 8 9 10 11 12 13 14 } { 1 2 3 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000 49: { 1 2 3 } { 4 5 6 7 } { 8 9 10 11 12 13 14 } { 15 16 17 18 19 20 21 22 23 24 } Error = 0.000
Cluster 1 8 Red 9 Red 10 Red 11 Red 12 Red
Settings, weights, and sequences.
This is what Pajek was trying to replicate. The ”-‐” indicates a null cell and the ”com” indicates a complete cell. In this case, any cell could be either.
You can assign different ”penalties for each block not matching the ideal. These weights help determine what Pajek sees as an optimal solution. 1 is the default.
These are a few of the repititons Pajek made as it tried to minimize errors and meet your specifications.
Network Analysis ICPSR Ann Arbor, Summer 2015
49
13 Red 14 Red Cluster 2 4 Blue 5 Blue 6 Blue 7 Blue Cluster 3 1 Green 2 Green 3 Green Cluster 4 15 Yellow 16 Yellow 17 Yellow 18 Yellow 19 Yellow 20 Yellow 21 Yellow 22 Yellow 23 Yellow 24 Yellow Reordered Matrix: 8 9 10 11 12 13 14 4 5 6 7 1 2 3 15 16 17 18 19 20 21 22 23 24 Red 8 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 9 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 10 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 11 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 12 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 13 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Red 14 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Blue 4 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 Blue 5 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 Blue 6 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 Blue 7 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 Green 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 Green 2 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 Green 3 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 Yellow 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Yellow 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Final Image Matrix: 1 2 3 4 1 - com - - 2 - com com - 3 - - com - 4 - - - - Final Error Matrix: 1 2 3 4 1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 4 0 0 0 0
Final error = 0.000
::::OUTPUT END:::
ð Run this again with the file colorblocks. This is a very similar network. Run it again with four clusters. Compare your results, paying particular attention to the error matrix. Interpret the numbers you find there. ð Now you will experiment with Pakek’s User Defined Blockmodeling options. In the top pull-down menu of the blockmodeling window, select “User Defined.” Click on one of the matrix cells to the right and you will see the middle column appear.
These are the best fitting clusters Pajek found.
A ”reduced” image matrix that shows you the types of equivalence found.
The numbers in each cell represent the numbers of 1s found where zeros should be, or vice versa.
Network Analysis ICPSR Ann Arbor, Summer 2015
50
These 12 options that you have for blocks correspond to these ideal block types:
Taken from Optimization Approach to Blockmodeling, (http://mrvar.fdv.uni-lj.si/sola/info4/nusa/doc/srce.pdf) by Ferligoj, Doreian, and Batagelj. ð By default, Pajek places a null and complete block in each section. However, you can specify each block with a different form of equivalence. This is the ideal type of equivalence this network should have: 1 2 3 4 1 - com - -
2 - com com - 3 - - com - 4 - - - -
ð Try specifying different types of blocks instead of "complete" and see if you low the number of errors. (Note: this isn’t how you would do research, where your choice of blocks would be informed by your hypotheses about the roles and relationships among them. We are just trying this to get a handle on errors and different types of equivalence.)
Network Analysis ICPSR Ann Arbor, Summer 2015
51
Another example
1. From what you know about the fifth grade network, formulate a hypothesis about the relations among and between gender roles. If you need to refresh your memory, there is a copy of the UCINET fifth grade file in the data folder. Jot down a hypothesis about how you would prespecify a blockmodel with respect to gender (fifthsex). An example would be from the colorblocks file from above: "In this network, the Greens will chose only themselves and will be chosen by the Blues. The Blues are chosen only by the Reds. No one chooses the Yellows or Reds, including themselves.” 2. You will find the fifth grade network (fifthlabeled) in your data file. Create two user defined models that best test your hypothesis in Pajek and run them. For reference, a listing of all of the actors in this network and their genders are pictured here.
3. Summarize your findings and make note of exceptional actors. 4. Using the partition file that is generated by Pajek when you run your blockmodel, you can permute your matrix (PARTITION>MAKE PERMUTATION) and export the newly matrix as an EPS FILE (NETWORK>EXPORT MATRIX TO EPS>USING PERMUTATION. Save the file in a new location and examine it.