# Computing structural equivalence for the fakedata -------------------------
data(fakesurvey)
# Coercing it into a diffnet object
fakediffnet <- survey_to_diffnet(
fakesurvey, "id", c("net1", "net2", "net3"), "toa", "group"
)
# Computing structural equivalence without specifying group
se_all <- struct_equiv(fakediffnet)
# Notice that pairs of individuals from different communities have
# non-zero values
se_all
se_all[[1]]$SE
# ... Now specifying a groupvar
se_group <- struct_equiv(fakediffnet, groupvar="group")
# Notice that pairs of individuals from different communities have
# only zero values.
se_group
se_group[[1]]$SE
Run the code above in your browser using DataLab