How to Use‎ > ‎

FAQs & Tips

Archive of tips, tricks and answers to frequently asked questions about using UCINET. You can scroll through (the full posts are at the bottom of the page) but you can also search this site (see button on top right of page). 

Frequently-asked questions about using UCINET

  • How are the coefficients in MR-QAP calculated? The same as in OLS. The only difference is in the p-values. For example, suppose we have these two networks (expressed as adjacency matrices):  X 1 2 3 4 ...
    Posted Aug 24, 2016, 2:21 PM by Steve Borgatti
  • Connecting with R There are a number of ways to read UCINET DL files into R. But these involve the extra step of exporting UCINET system files (the ones with ##h and ##d ...
    Posted Aug 1, 2016, 11:57 AM by Steve Borgatti
  • Importing pilesort data into ucinet Three methods:1. Import a dl file. This is the original anthropac 4.0 format. In the main menu, go to Data|Import Text files|DL and give it as ...
    Posted Jul 20, 2016, 1:15 PM by Steve Borgatti
  • Importing nodelist data importing nodelist data into ucinet.docx
    Posted May 8, 2016, 11:17 AM by Steve Borgatti
  • Importing data into UCINET There are many ways to enter data into UCINET. If your data are in a compressed format, such as a nodelist or an edgelist, the easiest thing to do is ...
    Posted May 8, 2016, 11:20 AM by Steve Borgatti
  • Handling missing data It is often said that network analysis is less forgiving of missing data than other forms of research. This is probably not nearly as true as people think (see Borgatti ...
    Posted Feb 3, 2015, 11:50 AM by Steve Borgatti
  • Reciprocity -- arc or dyad? What's the difference between arc-based reciprocity and dyad-based reciprocity? Let R be the number of reciprocated arcs and U be the number of unreciprocated arcs. An arc ...
    Posted Apr 25, 2016, 7:30 PM by Steve Borgatti
  • Notepad & textual output Some people have had a problem where, after running a procedure, they get an error message saying something like this:Two steps should be taken to fix this problem. STEP ...
    Posted Jan 12, 2015, 8:58 AM by Steve Borgatti
  • Input and Output in the Command Line Interface (CLI) The command line interface, otherwise known as Matrix Algebra, has a number of functions for getting data in and out of the system. Reading DL text files->mydata = loaddl(mydata ...
    Posted Oct 29, 2014, 11:00 AM by Steve Borgatti
  • Is there a "corrected constraint" measure? We recently heard the idea that the constraint measure in UCINET is not identical to the Burt 1992 measure but is instead a "corrected" measure. This is incorrect. The measure ...
    Posted Sep 11, 2014, 1:11 PM by Steve Borgatti
  • Missing values and centrality measures No centrality measure in UCINET distinguishes between missing values and zeros. For example, if your adjacency matrix has a row of missing values indicating that the node did not fill ...
    Posted Jun 17, 2014, 7:32 AM by Steve Borgatti
  • Which centrality measures handle valued data? The measures that understand values are eigenvector, beta centrality (aka Bonacich Power), Hubbell, Katz, PN, flow betweenness, simple degree, information centrality and political independence. Degree and eigenvector can be described ...
    Posted Sep 10, 2014, 6:42 AM by Steve Borgatti
  • Importing data from online survey software Here is are two tutorials showing you how to go from a messy, raw excel file produced by an online survey tool, to a ucinet system file. https://sites.google ...
    Posted Jul 6, 2016, 1:31 PM by Steve Borgatti
  • Node labels missing in NetDraw A year or two ago, ucinet and netdraw were upgraded to allow Unicode labels (to represent Chinese characters, etc). A consequence of this is that if you try to open ...
    Posted Jun 11, 2014, 11:12 AM by Steve Borgatti
  • Get the distance to a node or set of nodes Suppose you want to measure, for each node in the network, how many links away they are from the three most important nodes. How do you do it? First, you ...
    Posted May 28, 2014, 3:35 PM by Steve Borgatti
  • Windows/Notepad settings for UCINET There are several Windows and Notepad settings that make working with UCINET better. Here are a few:Tell Windows to show file extensions. Here's how.Sort by Date Modified ...
    Posted Mar 17, 2014, 6:03 PM by Steve Borgatti
  • The datafiles and UCINET Data folders When you install UCINET, you will find there is a folder containing the standard UCINET datasets in this folder:C:\Program Files (x86)\Analytic Technologies\datafiles However, you should not ...
    Posted Jan 19, 2014, 8:33 AM by Steve Borgatti
  • Accuracy measures in CSS routine The current CSS routine outputs individual-level accuracy measures. These measure the agreement between an individual's perception of the network (their "slice") with the "true" network. Pearson. This is ...
    Posted Aug 2, 2013, 8:28 AM by Steve Borgatti
  • Network analyses via matrix algebra commands The matrix algebra facility in UCINET is probably better thought of as a command-line interface. It is especially useful because you can enter the commands in a text file ...
    Posted Jul 28, 2013, 2:08 PM by Steve Borgatti
  • Installing UCINET on a Mac or Linux machine using Wine UCINET is a Windows program. To run it on another platform you will need a Windows partition (such as Boot Camp), a Windows emulator (such as VMware Fusion or Parallels ...
    Posted Jun 15, 2015, 11:43 AM by Steve Borgatti
  • Running Pajek from within UCINET Before you can execute Pajek from UCINET, you need to tell UCINET where to find the pajek.exe file. In the UCINET main menu, go to Options|Helper Applications, which ...
    Posted May 5, 2013, 2:43 PM by Steve Borgatti
  • Repeating subgroup analysis on multiple datasets [For UCINET 6.458 or later]Suppose you need find subgroups in 200 separate networks. The networks involve different nodes, so they can't be stacked into one UCINET dataset ...
    Posted Jul 15, 2015, 3:33 PM by Steve Borgatti
  • Entering Data Using the DL Editor The DL editor is the recommended way of entering data into UCINET. Please see the attached Doc file "Entering Data Using the DL Editor.docx" and its accompanying Excel file ...
    Posted Feb 10, 2013, 2:54 PM by Steve Borgatti
  • Allowable filenames Currently, UCINET does not allow filenames to contain periods (".") other than the one preceding "##H" or "##D". Spaces and other punctuation are allowed (assuming they are allowed by Windows). 
    Posted Dec 8, 2012, 9:12 AM by Steve Borgatti
  • Problems installing and/or running UCINET for first time One source of UCINET start-up issues is user permissions. These can lead to problems both in registering the program and in running any procedure that yields textual output. Registering ...
    Posted Nov 4, 2012, 1:02 PM by Steve Borgatti
  • Combining similar relations The attached Word document (see below) discusses how to combine a set of relations that are thought to be empirically similar, such as "likes", "respects", "socializes with" .  
    Posted Oct 20, 2012, 1:23 PM by Steve Borgatti
  • What are the ##h and ##d files? UCINET stores each logical dataset (called, say, CAMPNET) as a combination of two physical files (CAMPNET.##H and CAMPNET.##D). The ##h and ##d files together make one dataset, so ...
    Posted Oct 20, 2012, 12:42 PM by Steve Borgatti
  • How to register the program When you buy the program, you receive a registration code. After downloading and installing UCINET, you must then start the program, go to Help on the main menu, and choose ...
    Posted Nov 4, 2012, 1:03 PM by Steve Borgatti
  • Using the FORFILES command ForFiles command in Matrix AlgebraLets you repeat a command for a series of files that are similarly named, as in "samplk1", "samplk2", "samplk3"Syntax is ->forfiles <filemask> <command with ...
    Posted Jul 15, 2015, 10:02 AM by Steve Borgatti
  • Keyboard shortcuts for UCINET functions General Commands   Open Previous Log File Control + O Exit Program Alt + X Open Text Editor Control + E Repeat Last Command Alt + Backspace Open Matrix Algebra Command Window  Control + G     Data ...
    Posted Jun 27, 2012, 10:08 AM by Steve Borgatti
  • Sorting files in descending order by date modified Having Windows automatically sort files in descending order by data modified is extremely helpful when using UCINET. The program produces a number of outputs and rather than remember them it ...
    Posted Jan 20, 2014, 2:35 PM by Steve Borgatti
  • Using the matrix algebra batch command Batch commandThis lets you store and execute sequences of commands -- in short, macros or programs.Syntax is ->Batch <filename> where <filename> is the name of a text file containing ...
    Posted Jan 26, 2013, 12:12 PM by Steve Borgatti
Showing posts 1 - 32 of 32. View more »

How are the coefficients in MR-QAP calculated?

posted Aug 24, 2016, 2:21 PM by Steve Borgatti

The same as in OLS. The only difference is in the p-values. For example, suppose we have these two networks (expressed as adjacency matrices): 

X 1 2 3 4 5
1 0 0 1 0 0
2 0 0 0 0 0
3 0 0 0 0 1
4 0 0 0 0 0
5 0 0 0 0 0

Y 1 2 3 4 5
1 0 0 1 0 0
2 0 0 0 0 0
3 1 0 0 0 0
4 0 0 0 0 0
5 0 0 0 0 0

Now we use MR-QAP to predict the Y matrix from the X matrix. Here are the results:

MODEL FIT

                R-Square    Adj R-Sqr      P-Value          Obs        Perms 
            ------------ ------------ ------------ ------------ ------------ 
      Model      0.19753      0.15295      0.17299     20.00000  20000.00000 

REGRESSION COEFFICIENTS

                  Un-Stdized Stdized Coef      P-value     As Large     As Small      Std Err 
                ------------ ------------ ------------ ------------ ------------ ------------ 
           Xmat      0.44444      0.44444      0.19549      0.19549      1.00000      0.22030 
      Intercept      0.05556      0.00000      0.00000      0.00000      0.00000      0.00000 

Next we run the same regression in Stata. First step is to convert the data matrices into something Stata can understand, which is columns:

Pair X Y
1-2 0 0
1-3 1 1
1-4 0 0
1-5 0 0
2-1 0 0
2-3 0 0
2-4 0 0
2-5 0 0
3-1 0 1
3-2 0 0
3-4 0 0
3-5 1 0
4-1 0 0
4-2 0 0
4-3 0 0
4-5 0 0
5-1 0 0
5-2 0 0
5-3 0 0
5-4 0 0

We enter these data into Stata, and then run regression: 

. regress y x

      Source |       SS       df       MS              Number of obs =      20
-------------+------------------------------           F(  1,    18) =    4.43
       Model |  .355555556     1  .355555556           Prob > F      =  0.0496
    Residual |  1.44444444    18  .080246914           R-squared     =  0.1975
-------------+------------------------------           Adj R-squared =  0.1529
       Total |         1.8    19  .094736842           Root MSE      =  .28328

------------------------------------------------------------------------------
           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           x |   .4444444   .2111436     2.10   0.050     .0008482    .8880407
       _cons |   .0555556   .0667695     0.83   0.416    -.0847219     .195833
------------------------------------------------------------------------------

As you can see, the regression coefficients are the same, but the p-values are different. 

Connecting with R

posted Aug 1, 2016, 11:50 AM by Steve Borgatti   [ updated Aug 1, 2016, 11:57 AM ]

There are a number of ways to read UCINET DL files into R. But these involve the extra step of exporting UCINET system files (the ones with ##h and ##d extensions) to the DL text files. Alternatively there are now a couple of ways of working with UCINET system files directly. 

Here's a package that just reads UCINET system files, written Jesse Fagan:
And here is some code for both reading and writing UCINET system files, by Christian Steglich:

Importing pilesort data into ucinet

posted Jul 20, 2016, 1:15 PM by Steve Borgatti

Three methods:

1. Import a dl file. This is the original anthropac 4.0 format.
  • In the main menu, go to Data|Import Text files|DL and give it as input a standard dl file such as the attached holidays.txt (scroll down). Call the output "indprox" 
  • Go to the CLI (what used to be called matrix algebra) and type:
        ->agprox = wavg(indprox row col)
  • Or, if you prefer using menus, go to Transform|Matrix Operations|Within Dataset|Aggregations and give it indprox as the input, and choose Average as the method 
2. Import a visual anthropac file 
    a. Go to the CLI (what used to be called matrix algebra) and type:

        ->indprox = loadps("freesortsfromtablet.txt" pile)
        ->agprox = wavg(indprox row col)

    b. Scroll down to download the 'freesortsfromtablet.txt' file

3. Cut and paste from Excel into the DL Editor.

    a. Enter data as follows (in the example, there two respondents, separated by a space)


    b. Choose “piles” as the format. Then press save button. Call the output Agprox

    c. This method has the advantage of creating agprox directly, but has the disadvantage that, if wanted indprox, you can’t have it

Importing data into UCINET

posted Feb 21, 2015, 2:20 PM by Steve Borgatti   [ updated May 8, 2016, 11:20 AM ]

There are many ways to enter data into UCINET. If your data are in a compressed format, such as a nodelist or an edgelist, the easiest thing to do is  typically to enter the data in Excel and then cut and paste from Excel into the DL Editor. Here is an example of a nodelist:


For detailed instructions on how to read a nodelist, see this document.
And here are the same data expressed as an edgelist:


For multiple relations, there is the edgelist23 format. The third column gives the relation:


(It is also possible to add a 4th column giving the strength of tie.)

A limitation of the dl editor is that, for data are organized as matrices, the editor can only handle one matrix. If you have multiple matrices, each one representing a different relation, you need to use the the matrix editor, which uses multiple tabs for multiple relations:


Note that when you save, if all of the tabs have the same dimensions and node labels, all matrices will be written to the same ucinet dataset. But if the different tabs contain data with different dimensions or labels, then only the currently visible tab will be saved.

Importing

Instead of cutting and pasting, you can also go to File|Open and open a variety of file types, including UCINET, Excel, CSV, GraphML (matrix editor only). 

Command line interface (matrix algebra)

The matrix editor is available in the command line interface (CLI) by typing Edit. In addition, you can import Excel files by typing something like

->mydata = loadexcel('mydata.xls')

This creates a UCINET dataset called mydata from an excel file called mydata.xls

Handling missing data

posted Feb 3, 2015, 11:50 AM by Steve Borgatti

It is often said that network analysis is less forgiving of missing data than other forms of research. This is probably not nearly as true as people think (see Borgatti, Carley and Krackhardt, 2006), but there is something to it.

 

We should distinguish between two forms of missing data:  node level, and tie level. Node level is where a respondent does not answer the network portion of a survey at all, as if they were not part of the study. Tie level missing data is where they choose not to given an evaluation of a particular actor (such as their boss), but do answer for other actors. (Or, in an observational study, a given pair are not selected to be observed, so it is unknown how they interact.)

 

Tie level missing data -- if not excessive -- can be handled by standard imputation approaches, such as the Ward, Hoff and Lofdahl (2003) approach, and we don't discuss it further.

 

Node level missing data is more problematic. Two main strategies are used to deal with it. First, you can ignore the missing node entirely, as if it never existed. From a matrix perspective, if the original data matrix had 50 rows and columns, the new matrix will now have 49 rows and columns.

 

Another approach is to impute the missing data, which means to guess what the person would have answered had they had a chance. There are several ways to do this, including modeling the dataset by fitting an ERG model, then filling in the missing data with maximum likelihood estimates based on the parameters of the ERGM. But the simple way is as follows.

 

Undirected (logically symmetric data)

 

First, let's consider the case of an undirected relation (i.e., a social relation that is logically symmetric). In that case, the simple strategy is to assume that if the respondent had answered, he would have responded the same way that others in fact did about him. In short, the person's column in the data matrix (what people say about them) is used to fill in the values of the person's row, which is missing.

 

The easy way to do this in UCINET is via an undocumented matrix algebra command called replacena. Given input matrices A and B, the replacena routine changes any missing values found in A to the corresponding value found in B, and saves the result in a new matrix C. For, example, typing

 

--> C = replacena(A B)

 

ask the program to create a new dataset C such that cij = bij if aij is missing, and cij = aij otherwise.

 

So how do you use this to replaced missing values with what the other person said? The information about what the other person said about the missing person is given in the missing person's column. So you cij = aij when person i answered the survey, but aji when they didn't. In other words, you want to use the transpose of the matrix. So if A is the raw data matrix, you want to create a new version of it called, say, A-cleaned as follows:

 

--> A-cleaned = replacena(A transpose(B))

 

Directed (logically nonsymmetric data)

 

If the network is directed, such as who gives advice to whom, we can't use the trick above, because there is no reason that if person I gives advice to person J, person j gives advice to person I. But if we can do something very similar *if* we have had the foresight to ask the directed relation in two separate directions. By separate directions I mean that whenever you ask "who do you go to for advice" (GET) you also ask "who comes to you for advice" (GIVE). Each of these creates its own matrix, and you can used to fill in for each other, because if i seeks advice from j, then we expect that j would report i coming to them for advice. Now if i doesn't fill out the survey, then one approach to handling the missing data is to assume that i's row in the "goes to for advice" matrix would resemble i's column in the "comes to you for advice matrix", which means we could use replacena to fill in the missing values, as follows:

 

--> CLEANEDGET = replacena(GET transpose(GIVE))

--> CLEANEDGIVE = replacena(GIVE, transpose(GET))

 

In Ucinet versions 6.549 and later, this option is also available in the menu system, under Transform. 

 

Bibliography

  • Borgatti, S.P., Carley, K., and Krackhardt, D. 2006. Robustness of Centrality Measures under Conditions of Imperfect Data. Social Networks 28: 124–136.[pdf]
  • Gueorgi Kossinets, Effects of missing data in social networks, Social NetworksVolume 28, Issue 3, , July 2006, Pages 247-268.[^pdf]
  • Ward, M.D., Hoff, P.D., and Lofdahl, C.L. (2003) "Identifying International Networks: Latent Spaces and Imputation," in Dynamic Social Network Modeling and Analysis: Workshop Summary and Papers , 345-359, Ronald Breiger, Kathleen Carley, and Philippa Pattison, eds., Washington, D.C., The National Academies Press. [pdf]

Reciprocity -- arc or dyad?

posted Jan 25, 2015, 1:10 PM by Steve Borgatti   [ updated Apr 25, 2016, 7:30 PM ]

What's the difference between arc-based reciprocity and dyad-based reciprocity? 

Let R be the number of reciprocated arcs and U be the number of unreciprocated arcs. An arc is an ordered pair (x,y) where x sends a tie to y. An arc (x,y) is said to be reciprocated if the arc (y,x) is also present.

Arc Reciprocity
  • of all outgoing arcs, what proportion are reciprocated?
  • Reciprocity = R/(R+U)
Dyad Reciprocity
  • of all dyads, what proportion are symmetric?
  • Reciprocity = R/(R+2U)

Notepad & textual output

posted Jan 12, 2015, 8:58 AM by Steve Borgatti

Some people have had a problem where, after running a procedure, they get an error message saying something like this:


Two steps should be taken to fix this problem. 

STEP 1. Select a suitable scratch folder.
In the UCINET main menu, go to Options|Scratch Folder and set it to the user's appdata folder, like this:


This should always work, but if not try the Windows Temp folder or some other folder that you know you have write-access to.

STEP 2. Tell ucinet to use notepad.exe as its text editor. 
 Go to Options|Helper Applications in UCINET main menu, and ensure that Notepad.exe is listed in the Editor field:


Note that (a) a full path name is not usually required for notepad.exe (because it belongs to Windows). 
Also -- irrelevant to the issue at hand -- the location of netdraw in the example is idiosyncratic. The usual pathname is something like c:\program files(x86)\analytic technologies\netdraw.exe.


Input and Output in the Command Line Interface (CLI)

posted Oct 29, 2014, 11:00 AM by Steve Borgatti

The command line interface, otherwise known as Matrix Algebra, has a number of functions for getting data in and out of the system. 

Reading DL text files
->mydata = loaddl(mydata.txt)

Reading Excel matrices
->mydata = loadexcel(mydata.xls)

Saving text files with tabs as separators
-> save campnet “campnet data.txt”

Saving data as comma-separated files (CSV): 
-> save campnet “campnet data.csv”

Saving to Excel:
-> save campnet “campnet data.xls”

You can also edit or browse data by using the EDIT command:
->edit campnet

Is there a "corrected constraint" measure?

posted Sep 11, 2014, 1:07 PM by Steve Borgatti   [ updated Sep 11, 2014, 1:11 PM ]

We recently heard the idea that the constraint measure in UCINET is not identical to the Burt 1992 measure but is instead a "corrected" measure. This is incorrect. The measure used is Burt's. Three theories about why this perception might exist.
First, this paper, 
  • Borgatti, S. P. 1997. Structural holes: Unpacking Burt’s redundancy measures. Connections, 20(1): 35‑38. [pdf]
is sometimes interpreted as finding errors in Burt's measure. It doesn't. The paper shows that, for binary data, there is a simpler, nicer formula that gives the same results -- for the effective size measure, not constraint. The paper does quibble with a particular example in Burt's book, and it does have a regrettably snarky tone, but does not provide a corrected formula for constraint. 

Second, UCINET provides an option for including ego's alters alters in the calculation of constraint. If you were to choose this option -- which is not the default -- you would not be doing what Burt does. Even so, the formula remains unchanged.

Third, occasionally people have noticed that constraint is not constrained to the range 0...1. It can in fact have values larger than 1. Since this seems undesirable, perhaps it was thought that UCINET would have corrected that. It doesn't. The overage does no harm, and it's the way Burt wrote it, so why change it?

1-10 of 32