[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] How to test if there is any relationship between attributes of
From: |
capitano . nemo |
Subject: |
[igraph] How to test if there is any relationship between attributes of edges and nodes |
Date: |
Wed, 05 Feb 2014 00:30:11 +0000 |
User-agent: |
autistici.org webmail |
Hello list,
I want to test whether two attributes of each pair of nodes in my graph
have any relationship with one attribute of the edge linking them.
I have some problem both on the statistical and coding side in getting
to that.
Let's take this graph randomly generated (only for purpose of
reproducibility):
library(igraph)
# Create random graph
vertices <- 100
g <- random.graph.game(vertices, .05, directed=FALSE)
# Assign attribute 1 to vertices
V(g)$size <- sample(1:100, vertices, replace=T)
# Assign attribute 2 to vertices
V(g)$time <- sample(1000:2000, vertices, replace=T)
# Assign weight to edges
edges <- ecount(g)
E(g)$weight <- sample(1:10, edges, replace=T)
Each node represents an event with V(g)$size indicating the number of
participants and V(g)$time the time of the event. E(g)$weight indicates
the number of participants shared by the two nodes connected by the
edge; no edge can be understood as E(g)$weight = 0.
I want to test two hypothesis:
1) When V(g)$size increases for one or both nodes, E(g)$weight of the
connecting edge also increases;
2) When the difference between the two V(g)$time decreases (thus the
event happens closer in time), E(g)$weight of the connecting edge
increases.
I think I could attempt to use a regression analysis for the second
hypothesis using the difference in time as the independent variable and
E(g)$weight as the dependent variable. But what to do (statistically)
and how to do it (in terms of code) with the first hypothesis? I have
some conceptual problem here since the independent variable is split
into two different nodes and assumes two different values... Also
wouldn't be better to test both independent variables V(g)$size and
difference in V(g)$time in the same model?
- [igraph] How to test if there is any relationship between attributes of edges and nodes,
capitano . nemo <=
- Re: [igraph] How to test if there is any relationship between attributes of edges and nodes, Tamás Nepusz, 2014/02/05
- Re: [igraph] How to test if there is any relationship between attributes of edges and nodes, Gábor Csárdi, 2014/02/05
- Re: [igraph] How to test if there is any relationship between attributes of edges and nodes, Francesco, 2014/02/05
- [igraph] Visual C++, Ragia Ibrahim, 2014/02/06
- Re: [igraph] Visual C++, Gábor Csárdi, 2014/02/06
- Re: [igraph] Visual C++, Ragia Ibrahim, 2014/02/07
- Re: [igraph] Visual C++, Gábor Csárdi, 2014/02/07
- Re: [igraph] Visual C++, Ragia Ibrahim, 2014/02/08
- [igraph] time stamp, Ragia Ibrahim, 2014/02/08
- Re: [igraph] time stamp, Gábor Csárdi, 2014/02/08