# True network (4x4)
true_net <- matrix(c(
0, 1, 0, 1,
1, 0, 1, 0,
0, 1, 0, 1,
1, 0, 1, 0
), nrow = 4, byrow = TRUE)
# Perceived network by individual 1
perceived_net1 <- matrix(c(
0, 1, 1, 1, # Person 1 thinks there are more connections
1, 0, 1, 0,
1, 1, 0, 1,
1, 0, 1, 0
), nrow = 4, byrow = TRUE)
# Perceived network by individual 2
perceived_net2 <- matrix(c(
0, 1, 0, 0, # Person 2 thinks there are fewer connections
1, 0, 0, 0,
0, 0, 0, 1,
0, 0, 1, 0
), nrow = 4, byrow = TRUE)
# Create barry_graph from list
net_list <- list(true_net, perceived_net1, perceived_net2)
graph_from_list <- new_barry_graph(net_list)
print(graph_from_list)