My problem is the following:
I am using the R SNA package for social network analysis. Lets say, my starting point is an edgelist with the following characteristics. Every row contains a firm name, the ID of a project they are involved and further characteristics, let's say the projects year. Firms can be in several projects, and one project can consist of a cooperation of more than one firm. Example:
Name Project Year
AA 1 2003
AB 1 2003
AB 2 2003
AB 3 2004
AC 2 2003
AC 4 2005
For the network analysis I need a adjacency matrix with all firms as row and column header, which I construct as follows:
grants.edgelist <- read.csv("00-composed.csv", header = TRUE, sep = ";", quote="\"", dec=",", fill = TRUE, comment.char="")
grants.2mode <- table(grants.edgelist) # cross tabulate -> 2-mode sociomatrix
grants.adj <- grants.2mode%*%t(grants.2mode) # Adjacency matrix as product of the 2-mode sociomatrix`
Now my problem: I want to run a netlm Regression on the adjacency matrix, where I test how the network in one given year explains the network in the next year. However, therefore I wanted to subset the grants.edgelist in a set for (lets say) 2003 and 2005 only. However, I figured out that not all firms are in projects every year, and therefore the corresponding adjacency matrix has different rows and columns.
Now my question: How could I obtain a adjacency matrix containing all firms in row and column header, but their intersection set on zero expect of the year I want to observe. I hope it is clear what I mean.
Thank you very much in advance. This problem is driving me crazy today!
Best wishes
Daniel