I have a dataset of firms contracting with each other. I am trying to study the proliferation of contract design characteristics along this network. In order to do this I have first converted my two-mode adjacency matrix into a lingraph. Each node in the linegraph now is a contract with various contract attributes.
What I am trying to do is to create a variable that is the count of all the alters that match the ego in terms of a particular contract trait. This is basically a row or column total in the linegraph recoded to take the value of 1 or 0 if the contract traits match. Now since my dataset is a set of cross-sections taken every year, I should also make sure that this count only includes alters that have had this trait in the past and not in the future. So the long way is to do this process year by year and then create a unique variable for each year So far I have managed the following import the edgelist from stata make it a linegraph The next step is to multiply every element of row i with a vector (N*1) with the contract attribute then do a row sum and save that rowsum saved as another vector which i will export to stata. The catch is i am not sure the row order in the linegraph is the same as that in the edgelist. And with 20,000 observations it's hard to check manually. So i'd like to append the linegraph with a rowlabel comprising of "vertex1-vertex2" from the edgelist. Am sure there is a simple way to do this but am not able to figure it out Thanks in advance Kiron _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
