My email address is on the About-page.

Tore

]]>I am doing my project of Epistemic network analysis which deals with weighted networks and its statistical analysis. I would like to ask you couple of questions regarding my project. Could you share me your email id?

Thanks,

Rathnesh

]]>tnet is optimized for sparse matrix networks. What functions would you like to use?

Also, you might want to look into using SNAP (http://snap.stanford.edu/snap/index.html) if your network is already in C/C++.

Best,

Tore

Thank you so much for sharing your work, I found it extremely useful and I think is very important we share in order to avoid repeating ourselves all the time.

I am finding a problem, though and I am not sure if its related with your code or I am just doing something wrong. I am reading the output matrix from my C programme and storing it in a r matrix (myMatrix) first, but when trying to do:

net<-as.tnet(myMatrix)

or

net<-as.tnet(myMatrix, type="weighted one-mode tnet")

it takes extremely long times .

This matrix is not sparse. In my case it is a NxN matrix with N=2000, hence, the edge list has roughly less than 12 million elements.

My question is: it is normal to take that long, I am doing something wrong or the code is just not suitable for non-sparse matrices?

Regards,

Thank you for your time

]]>Indeed that is the correct interpretation.

Good luck,

Tore

Thank you very much for sharing your work.

Can you please confirm if my understanding with the argument “net” is correct in the primitives such as

betweenness_w(net, directed=NULL, alpha=1)

clustering_w(net, measure = “am”)

distance_w(net, directed=NULL, gconly=TRUE, subsample=1, seed=NULL)

The first argument “net” is required to be a weighted edgelist according to the document. However, when I use a weighted matrix it seems working fine. I am wondering if this is true. Is this because the following rules apply here?

“If the data-object has two-columns, it is assumed to be a binary two-mode network; three columns, weighted one-mode network; four columns, longitudinal; five or more and the same number of rows and columns, weighted one-mode network; five or more and –not– the same number of rows and columns, it is assumed to be a two-mode network.”

Thank you in advance.

Best,

Hang

The documentation in R is a collection of all functions (type ?tnet after library(tnet)).

Currently, no function is implemented to deal with negative tie weights, and as such, they cannot be analyzed.

Good luck,

Tore

Thank You! ]]>

To visualize a network, I would recommend NetDraw for beginners or Gephi. tnet is only for the analysis of networks.

Good luck!

Tore

Thank You very much for your work.

I\m new with R, so I have alredy tried to learn sites You have adviced for understanding it. But even after it I haven’t managed to solve my very simple (I thnink) task. I have a weighted network and need just to visualize it. I have data both in form of text file with edge list and a metrix in excel.

Could You please help me?

Best regards,

Nina

Have a look at this page: https://toreopsahl.com/tnet/two-mode-networks/

Best,

Tore

Thanks for the beautiful work you are doing. I am currently trying to analyse some two mode network (firms and their stakeholders). I was wondering if you have any suggestions for calculating clustering, density (of row and columns), point connectivity, decay centrality.

Best, George

]]>Glad that you are attempting to tackle more advanced types of networks. tnet can analyze some of those features individually, but it is not destined for multiplex networks. This is more out of a lack of metrics to apply to these networks. I’m afraid you will have to start coding up some metrics yourself if you want to go down this path.

Best,

Tore

Thank you so much for your work in SNA. I am trying to run a longitudinal, weighted, multi-relational (multiplex), network in R with one node type. Everyone tells me this is not possible with any packages out there. Will Tnet do this? I need to pull network metrics from the graph that take into account the complete network with multi-relations.

Thank you!

Jesse

Aline ]]>

Thanks for your comment.

The degree_w-function is not restricted in any way to small node ids; however, the return object includes all nodes from 1 to the maximum integer. The nodes ids without a mentioned in the edgelist will get a degree score of 0 (i.e., isolates). To overcome this issue, you can use the compress_ids-functions before running the degree_w-function. For example:

# Load tnet library(tnet) # Load network net <- rbind( c(1000,2000,4), c(1000,3000,2), c(2000,1000,4), c(2000,3000,4), c(2000,4000,1), c(2000,5000,2), c(3000,1000,2), c(3000,2000,4), c(4000,2000,1), c(5000,2000,2), c(5000,6000,1), c(6000,5000,1)) # Compress ids net.c <- compress_ids(net, type="weighted one-mode tnet") # Compute degree scores out <- degree_w(net.c[[1]]) # Convert back to original scores dimnames(net.c[[2]])[[2]] <- c("nodeID","node") out <- merge(out, net.c[[2]]) # Output out-object out[,c("nodeID", "degree", "output")] nodeID degree output 1 1000 2 6 2 2000 4 11 3 3000 2 6 4 4000 1 1 5 5000 2 3 6 6000 1 1

Hope this helps,

Tore

I was using the function degree_w() with a dataset containing long ids (6 digits) and it was returning strange results: my network has 3700 nodes, and it was returning a data frame with more than 50000 observations. Once a replaced the ids for shorter ones the function works a treat. Is there really a restriction for the size of ids the function can handle?

Best,

Aline

Thanks for your comment. I don’t know of other packages specifically for weighted and directed networks. However, all but one function in tnet works on directed and weighted networks (the local clustering coefficient is not defined for directed networks; hence, only implemented for undirected ones).

Best,

Tore

thanks for your efforts.

Do you have any hints for analyzing weighted directed networks in R?

Best,

Majom

Yes, you’re right. That node id was an isolate and so the BC value should be 0.0.

Thanks so much for your helpful advice. I could not have come up with this myself.

Best Regards,

Fatemeh

Thank you for your email and data. This happens because node 1309 is an isolate, and is not kept when the as.tnet-function is automatically run on the edgelist (it deletes tie weights of 0). If you would like to have an isolate included, please put it into the middle of the edge id sequence. This process is shown here: https://toreopsahl.com/2010/03/20/closeness-centrality-in-networks-with-disconnected-components/

Hope this helps,

Tore

Thanks so much for your response. I tried the recent version as well but still received the same results (the last node is missing). I emailed you the link table and the code. Could you please have a look at them?

Many thanks for your help,

Fatemeh

Thanks for using tnet!

There has been an update of the tnet package recently. Could you run update.packages() to ensure you have version 3.0.7? If you are experiencing similar problems, email me with the code and data you are using.

Best,

Tore

I came across a problem in using the Betweeness_w of tnet and it would be appreciated if you please help me with that:

I am interested to use the tnet package in order to calculate Betweenness Centrality for a weighted and undirected network. My network has 1309 nodes and 4229 links. I also add the reverse relationship between nodes to get the tnet to treat my network as an undirected one.

When I run the betweenness_W in R, it only gives me the BC value for the node 1 to 1308 and the last one (node id=1309) is missing. Do you have any idea what is the reason for this?

Kind Regards,

Fatemeh