Note that there are some explanatory texts on larger screens.

plurals
  1. POR SNA: Creating a adjacency matrix containing all actors but only values of a subset
    primarykey
    data
    text
    <p>My problem is the following:</p> <p>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: </p> <pre><code>Name Project Year AA 1 2003 AB 1 2003 AB 2 2003 AB 3 2004 AC 2 2003 AC 4 2005 </code></pre> <p>For the network analysis I need a adjacency matrix with all firms as row and column header, which I construct as follows:</p> <pre><code>grants.edgelist &lt;- read.csv("00-composed.csv", header = TRUE, sep = ";", quote="\"", dec=",", fill = TRUE, comment.char="") grants.2mode &lt;- table(grants.edgelist) # cross tabulate -&gt; 2-mode sociomatrix grants.adj &lt;- grants.2mode%*%t(grants.2mode) # Adjacency matrix as product of the 2-mode sociomatrix` </code></pre> <p>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.</p> <p>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.</p> <p>Thank you very much in advance. This problem is driving me crazy today!</p> <p>Best wishes</p> <p>Daniel</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload