[statnet_help] Degree by attribute in bipartite networks
F. Benjamin Rosche via statnet_help
statnet_help at u.washington.edu
Thu Aug 1 04:06:31 PDT 2024
Hi everyone!
I have a bipartite network of students selecting classes:
g <-
network(
data.frame(from=c(1,2,3), to=4), # 3 students selecting 1 class
matrix.type="edgelist",
vertex.attr = data.frame(id=1:4, race=c("B", "W", "W", NA)), # race as
a student attribute
directed = F,
bipartite = T
)
gplot(
g,
gmode="twomode",
usearrows = FALSE,
label = c("B", "W", "W", NA),
displaylabels = T,
)
I would like to measure how often, say, Black students are the only Black
student in class. In the example, the Black student is the only Black
student in the class.
I can't operationalize this statistic, however. I tried:
summary(g ~ F(~b1factor("race", levels="B"), ~b2degree(1))) # doesn't work
because b2degree is not a dyad-independent term.
summary(g ~ !b1nodematch("race", levels="B")) # NOT operator doesn't work
Is there a way to operationalize this statistic?
Thank you very much,
Ben
--
*Benjamin Rosche, Ph.D.*
Office of Population Research
Princeton University / benrosche.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/statnet_help/attachments/20240801/0bc05636/attachment.html>
More information about the statnet_help
mailing list