Social network analysis (SNA) is the methodical analysis of social networks. Social network analysis views social relationships in terms of network theory, consisting of nodes (representing individual actors within the network) and ties (which represent relationships between the individuals, such as friendship, kinship, organizational position, sexual relationships, etc.)
Questions tagged [sna]
296 questions
2
votes
1 answer
In a random graph: What is the probability that a node has a link to any node on a list x defined special nodes?
I have this problem for a calculation I'm doing on an observed network.
Let's imagine a random graph G(N,p) where N is the number of nodes and p is the probability of an edge being formed between any node ni and nj. The graph is undirected.
Let's…

nJGL
- 819
- 5
- 17
2
votes
1 answer
Can the ergm/statnet package deal with missing attribute data?
Just starting out with ERGM so apologies if the following question is not logical. I have tried to search on this site, and statnet_help, with no luck.
I was wondering whether the ergm() function in statnet can now cope with missing data on…

Evelyn
- 451
- 1
- 4
- 6
2
votes
1 answer
Clustering in Gephi 0.8.2
I'm working with a dataset in Gephi that is derived from a friends table from a Buddypress site. I've done a number of things to the graph which are useful using the built in functionality, but would be interested in a better clustering algorithm…

apellico
- 21
- 1
- 1
- 2
2
votes
1 answer
Assign colors to communities in igraph
I am using the fastgreedy.community detection algorithm in igraph to produce communities in R. The code returns 12 communities, however they are difficult to indentify when plotting because it returns a plot with a limited number of colours. How can…

user3731465
- 93
- 1
- 7
2
votes
1 answer
How to read Adjacency list into NetworkX to create a directed graph?
I have a .csv adjacency list with row 1 indicating source nodes, and row 2 – target nodes. I try to read the file with NetworkX, but I always get an undirected graph. How do I create a directed graph from such a file? Thanks.

Zlo
- 1,150
- 2
- 18
- 38
2
votes
1 answer
Convert nominal results from round robin tournaments into a list of adjacency matrices
I would like to take nominal results from a round-robin tournament and convert them to a list of binary adjacency matrices.
By convention, results from these tournaments are written by recording the name of the winner. Here is code for an example…

redatoms
- 23
- 4
2
votes
0 answers
Betweenness centrality for relatively large scale data
Using R,I try to calculate Betweenness centrality for about 1 million nodes and more than 20 million edges. To do so I have a pretty decent machine with 128GB ram and 4*2.40GHz CPU and a 64bit windows.
Yet, using betweeness() of Igraph takes ages. I…

user3299877
- 29
- 2
2
votes
2 answers
"Social Network Analysis Labs in R" (Stanford tutorials): Confusion over graph object / network class
I apologize if this question seems redundant, but I am beginning to play around with R and its SNA tools for a class and have been running a couple of different tutorials/labs to get accustomed. A resource that always gets recommended are the SNA…

Markus D
- 187
- 1
- 3
- 10
2
votes
1 answer
How to plot assortativity with R?
I found the figure below in literature about assortativity (for networks). I would like to plot my network in a similar way with R & igraph.
Every point on the graph corresponds to a network edge. In my case x axis should represent the source…

SWR
- 507
- 1
- 8
- 17
2
votes
1 answer
arranging matrix - network graphs
I was trying to make a network graph, using the function gplot from library(sna). The graph would represent the links between different fields.
I have the following data:
MTM <-…

Mareviv
- 165
- 1
- 11
2
votes
1 answer
R - Matching rows and colums of matrices with different length
my problem at the moment is the following. I have an directed 1-mode edgelist representing pairs of actors participating in joint projects in a certain year, which might look like:
projektleader projectpartner year
A B …

Daniel S. Hain
- 77
- 7
2
votes
2 answers
igraph edge between two vertices
I'm new to R and igraph and I was wondering if anybody can help me with the following.
I want to find the edge weight between two vertices in a graph. My graph structure is defined by the normal ego (node1), alter (node2) and the weight of the edge…

newmathwhodis
- 3,209
- 2
- 24
- 26
2
votes
1 answer
How can I import pajek .paj files into igraph for R?
This tutorial and the package documentation describe how to do it for pajek files of the .net format, but I need to import .paj files. I don't expect there is code that will import all .paj files, but perhaps someone has code that will work for…

Michael Bishop
- 1,875
- 4
- 17
- 23
1
vote
1 answer
Generating a connected and directed network in R
I am trying to generate a directed and connected scale-free network in R, such that, the in- and out-degrees of the network follow a power-law. I tried the below methods,
g<-sample_fitness_pl(10000, 1000000, 2.7, 2.7) generates a network with a…

user3856486
- 515
- 1
- 4
- 16
1
vote
0 answers
How to create an igraph object from an adjacency matrix
I wanted to create an igraph dataset in R to analyze the social networks I coded in the original adjacency matrix. Below you'll find the code I used:
returnees_data <- read.table(
"Returnees_Test1.csv",
sep=";", stringsAsFactors=FALSE,…

Schielonimus
- 11
- 1