[statnet_help] Modelling number of events and event size in bipartite network

Fisher, David david.fisher at abdn.ac.uk
Wed Nov 18 06:09:03 PST 2020


Hi all,

I was wondering if anyone had any insights into this?

Cheers,

David

From: Fisher, David <david.fisher at abdn.ac.uk>
Sent: 02 November 2020 10:23
To: statnet_help at u.washington.edu
Subject: [statnet_help] Modelling number of events and event size in bipartite network

Hi folks,

I posed this query in July, but thought I would ask again with code to perhaps demonstrate my problem a bit better.

I've recently started playing around with modelling actor by event bipartite networks using "ergm". My first mode are actors with a single attribute, which is a 2-level factor (lets call it "class", with reds and blues), while my 2nd mode are events which have no attributes. I am interested in modelling 2 processes in a two-mode network that can lead to a higher degree in the projected one-mode network. Actors can get a higher one-mode degree by: 1) attending more events & 2) attending events attended by more others. I am interested in specifically modelling these two processes in the two-mode network so I don't want to project to the one-mode then model a difference in degree.

I am reasonably happy I get at 1) with 'b1factor("class")'

But right now I cannot work out how to model 2). I am certain that there is a term for it and I am just not understanding the documentation. I don't think it is "b2factor("class")" as events do not vary by class. I don't think it is any of the nodematch functions (e.g. "b1nodematch("class")") as I am not interested (for now) in whether reds attend events with other reds. I think I want to compare the number of two paths between the two groups, but I can't see a function to do that. Alternatively, perhaps you could frame it as a b2 k-star question, and does the number of different k-stars where the events are the central node depend on the class of those nodes that they are attached too. I've tried "b2starmix(2,"class", diff=T)" and this gives 2 different estimates for the different classes, which may allow one to say whether the 2 classes are similar in terms of the size of the event, but I am not sure. I have also wondered about adding the event degree as an attribute, and then seeing if reds or blues differ in their preference to connect with events differing in that attribute.

Code recreating where I am at using the Davis Southern Women dataset here (I assume you can access the Davis dataset via statnet instead of tnet, but I haven't been able to track down how; "data(davis)" doesn't work for me:

library(tnet)
library(statnet)

# Load Davis' (1940) Southern Women Dataset
data(tnet)

sw_ebi = as.matrix( table(Davis.Southern.women.2mode) ) #18 women (rows), 14 social events (columns)

sw_bip = network(sw_ebi, bipartite = T)

#randomly assign 'class' as "red" or "blue". Code events as "black"
sw_bip %v% "class" = c(sample(c("red","blue"), nrow(sw_ebi), replace=T), rep("black", ncol(sw_ebi)))

plot(sw_bip, vertex.col = "class")

#Fit Bipartite ERGM, model differences in number of connections between classes
ergm_bip = ergm(sw_bip ~ edges +
b1factor("class") ,
reference=~Bernoulli)

summary(ergm_bip) #so this is good, but I also want to model whether blues or reds attend larger events.


Any help would be greatly appreciated.

Best regards,

David

David N. Fisher
he/him
Research Fellow
The School of Biological Sciences
University of Aberdeen
Web<https://evoetholab.com/> | GS<https://scholar.google.com/citations?user=1TuwKzQAAAAJ&hl=en> | Tw<https://twitter.com/DFofFreedom> | RG<https://www.researchgate.net/profile/David_Fisher30> | Or<https://orcid.org/0000-0002-4444-4450>



The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. SC013683.


The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. SC013683.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/statnet_help/attachments/20201118/c26d675b/attachment.html>


More information about the statnet_help mailing list