Please remember to specify the measure parameter to report the alpha metric. For example: degree_w(net=celegans.n306.net, measure=c(“degree”,”output”,”alpha”), alpha=0.5) See https://toreopsahl.com/tnet/weighted-networks/node-centrality/ for more details.

Best,

Tore

thank you very much for your webpage and your great work!

I’m trying to use tnet for a psychiatric research in which nodes are symptoms.

I have converted my correlation matrix to a matrix with 3 columns (i, j, and their weight) with as.tnet, but when I try to compute degree, betweenness and closeness (degree_w, betweenness_w, closeness_w) with different values of alpha, I’ve got in output the same results.

Hope you can help me to figure out what went wrong,

Again, thank you so much!

Antonia

]]>The overall score would be a single number for the entire network whereas the closeness metric supplied is for individual nodes.

My argument against using centralization (overall) scores is that these are often normalized by n(n-1) which might not be appropriate for networks as the number of connections often does not grow exponentially as more nodes are included (see Dunbar’s research).

Best,

Tore

Thank you very much for you great work

Best

Carmine

]]>What is your e-mail ?

Thanks!

G ]]>

I am not entirely sure I follow the problem you are trying to solve. If you would like, send me an email and we can discuss it in more detail.

Tore

]]>how are you?

I have a kind of ‘methodological question’ I’d like to discuss with you. I’m currently working on a network of auto accidents (still on it!!) where suspicious (connected) components of the network are assessed through the value of nodes attributes. Let me explain it better with an example.

Let’s imagine the network is made up by accidents, and each accident nod has a binary attribute that tells if the accident happened at night or not.

Hoc can I assess the value of the characteristic measured by this indicator for the whole set of nodes, that is for all the connected component? Just summing up all the values and dividing it by the number of nodes ? It seems a bit raw, but I haven’t got a better idea….

Did you face similar problems in your activity, so you can recommend some approach/strategy?

Many thanks in advance!

G

If you wish to compute a centrality score for a whole network, I would suggest taking the average value across nodes.

The weighted centrality scores do not have a theoretical maximum as weights are generally not bounded by an upper value. As such, centralization scores that are often bound between 0 and 1 are hard to define. As such, I have stayed clear of them. Also, I have issues with the normalization applied by these methods. For example, see comment #28 on https://toreopsahl.com/2010/04/21/article-node-centrality-in-weighted-networks-generalizing-degree-and-shortest-paths/

Best,

Tore

I would like to calculate network centralization in a weighted network. Can I simply average centrality estimates of the network members, calculated by tnet ? ]]>

Betweenness is often poorly applied in my view; however, a barter network is perhaps one of the few appropriate settings for applying it. How do you measure the tie weights? Also, have you consider the flow metric (Freeman et al., 1991)?

Best,

Tore

I believe you need to create an adjacency matrix for bipartite. See below.

Hope this helps,

Tore

# Load tnet and bipartite library(tnet) library(bipartite) # Get network and name it net for simplicity data(tnet) net <- Davis.Southern.women.2mode # Create matrix for bipartite g <- matrix(data=0, nrow=max(net[,1]), ncol=max(net[,2])) for(i in 1:nrow(net)) g[net[i,1],net[i,2]] <- 1 # Run a metric togetherness(g)]]>

Thank you very much for the package, the website, forum, paper and datasets.

I want to convert a dataset for example “Davis.Southern.women.2mode” whitch is a tnet object to a web object for the package “bipartite”.

Do you have any idea how can i do it??

Thanks for your help.

Mouna :)

]]>Glad you’re finding it useful. It is worth noting that these functions are written in R, so they won’t be the most efficient ones. You might was to compile the functions.

Also, the running time is linked to the density of the network. If you have specific issues, email me your code and data. Then I’ll have a look.

Tore

]]>Thank you very much for the package. It has been extremely useful for my PhD analyses. I work on association data on wild elephants. I consider elephants associated if they are found in the same group ( same location in date and time). The function rg_reshuffling_tm worked fine for one of my sites with about 300 observations and I got 1000 random networks in less than 10 minutes. However in another site with about 1000 observations (where each observation correspond to an individual’s occurrence at a specific) one reshuffling was still running after 8 hours. Is that something to be expected or is there a bug that can be fixed?

Thanks for your help,

Julie

]]>G ]]>

Have a look at the for-loop help pages in R. This should allow you to figure it out.

Best,

Tore

how are you?

Let me abouce of your patience and ask you a further question.

Let’s imagine I have to simulate say 10.000 random networks with the technique you described, that is with a rg_tm function.

In other words I need to embedd the rg_tm function into a loop , save the result and then getting the empirical distribution of some attribute values (e.g. number of seriously injured,…) .

Do you have any example code for this?

Thanks a lot!!!!

Ciao

Giovanni

That’s really helpful!

Giovanni ]]>

Have a look at tnet » Two-mode Networks » Random Networks (https://toreopsahl.com/tnet/two-mode-networks/random-networks/). You can create a classic random two-mode network with the rg_tm-function, and various reshufflings using the rg_reshuffling_tm-function.

In essence, if you want to create a network of 10 crashes involving 20 drivers with 30 relationships, type the following:

net <- rg_tm(ni=20,np=10, ties=30)

Then you can assign the edge attribute of whether the driver got seriously injured in that specific crash by typing (probability 20%):

net[,"serious.injured"] <- runif(nrow(net))<0.2

The node attribute of the crash can be generated separately by typing (assuming a 60% probability):

node.attribute.night <- runif(length(unique(net[,"p"])))<0.6

However, these functions do not fix elements such as "at least one driver must be involved in each creash". To do this, you can randomly reshuffle an existing network (see the rg_reshuffling_tm-function).

Tore

]]>how are you?

I have another question. Probably my network is a two-mode network as drivers in accident are linked only through the collision, so in a similar way to affiliation.

Can you give me a quick hint on how to create such a network with TNET?

I read all the material on the package I have only a doubt.

If a use AXX for collision and numbers for driver I may expect a structure like this

1 A3

2 A3

meaning that 1 and 2 are involved in the collision A3. How can I create the network with TNET? Do I have just to load it from an external file with the structure below?

Driver Collisions

1 A3

2 A3

Let’s imagine now I want to associate different attributes to Drivers and Collisions (e.g. Seriously Injured (Y/N) to drivers and “Collision Happened at Night (Y/N) to Collisions) : how can I do it?

Apologize for the trivial questions! Hope in the future to raise more intelligent ones.

Thanks!

Giovanni

Will try to implement your advice!

G

]]>I have found it, thank you very much.

Best

Rui