36
Pajek – Quick Reference sheet v2 – Sept 2009
10
4.0
Preparing the network for analysis
4.1
Read in the text file called SN workshops WITHOUT locations.txt using the same commands as on page 5
of this guide.
In Pajek, Click on ‘File’ – a drop-down box appears – click on ‘Network’ , then ‘Read’
File> Network> Read
This opens the files folders on your hardrive – browse till you find the file ‘SN workshops WITHOUT locations.txt’
– ‘click on it’ – then click on ‘open’
And this is what you should see.
1. A smaller box – called ‘Report’ with ’73 lines read’
2. The larger box (the Pajek program) where In the first empty space (Networks) you should see the name and
path of the file, and at the end, in brackets the number of nodes (36).
Usually, everyone wants a quick visualization of their network – so to draw the network.
Click on ‘Draw’ – a drop down menu appears – click on ‘Draw’ again
To better visualize the network. In this screen, Click on Layout – a drop down menu appears.
Click on Energy ► Kamada-Kawai ► Free
Then try Click on Energy ► Fruchterman-Rheingoldi ► 2D
What differences do you see between the 2 network drawings?
Minimize the drawing.
Usually one of the first things you are interested in is to find out how many components there are in the graph,
that is, how many subnetworks of people connected directly or indirectly by a path of one length or more. In
infectious disease most networks are undirected. The reason for starting with undirected graphs in infectious
disease, is because very often we don’t know which person transmitted to whom, so it is inaccurate to place
direction on the edges.
5.0
Components
5.1
To find out how many components there are in your graph and of what size; click on
Net> Components> Weak
A popup box will appear as below.
If you want to see all the components, then leave the default as 1. If you wish to see components which
are larger, say of four people or more, type in 4 and click on OK. The report window will appear then, as
the task is completed. Minimize or close it.