[Rsiena-help] Transform 1-mode edgelist to adjacency matrix
Daniel Stefan Hain
dsh at business.aau.dk
Thu Nov 29 16:24:03 CET 2012
Hi dear RSiena community,
I currently have the following problem. I am conducting a dynamic analysis on cooperation in research project on basis of a directed edgelist that looks like follows:
"Project leader" "Project partner" "Year" "Some more attributes"
Firm X Firm Y 2000
Firm A Firm X 2005
...
I want to divide the dataset into 3-4 subsets for different periods, lets say 2000-2002, 2003- 2005 ect. That's not the challenge (subseting in [R]), but then my problem is the following:
1.: How can I create a directed and weighted adjacency matrix out of this data structure for every single time period? Up to now I managed it with transforming it to an IGraph object and then back into an adjacency matrix. That works, but the resulting matrix for the selected timeframe does not contain all actors from the whole dataset, thus the resulting adjacency matrixes as input for RSiena all have different dimensions.
I up to now worked with 2-mode edgelists, there I just could tabulate the dataframe and multiply it with the transposed one to get the adjacency matrix. When I used subsets for the different time period, I could exploit the fact that R still keeps the index of everything that drops out of the subset, but shows up in the cross-tab and therefore in the adjacency again.
With a 1-mode edgelist it obviously does not work. Any advice is appreciated!
Vest wishes
Daniel S. Hain
PhD Fellow, M.Sc. Economics, Dipl.-Wirt.-Ing.
_______________________________________
Innovation, Knowledge and Economic Dynamics (IKE) Group
Strategic Research Alliance for Energy Innovation Systems (EIS)
Department of Business and Management
Aalborg University
Fibigerstraede 4, Room 16a
9220 Aalborg Øst, Denmark
Tel.: +45 9940 2724
Email: dsh at business.aau.dk<mailto:dsh at business.aau.dk>
Web: www.business.aau.dk<http://www.business.aau.dk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rsiena-help/attachments/20121129/ba8c60bd/attachment.html>
More information about the Rsiena-help
mailing list