|
From: | Gábor Csárdi |
Subject: | [igraph] Fwd: triad.census(): negative 003 counts |
Date: | Wed, 28 May 2014 23:10:31 +0200 |
Dear Gabor,
thank you very much for your fast reply to my post on the igraph newslist.
Attached to this email you find one STATA file that contains the basic information I am using to draw a graph. Relevant are the contained names in the list CTNG_hrm_level1 and CITED_hrm_level1 which are the nodes. Edges exist if refs_XY_AB is greater than 0.
I have about 900 files similar to this one. I get negative 003-counts for many of them. In case I made a basic coding mistake my apologies in advance. I am a long-time STATA user and this is my first time using R…
Setup: I am running R3.0.2 and control it via RStudio under windows 7. I can replicate the findings on Windows 7 32 bit as well as Windows 64 bit.
The code I am running is also attached. The attached code cycles through all my 900 files. For the attached file you can use this:
infile = paste("list_","1","_","1982",".dta", sep = "")
# read file into dataframe
data <- read.dta(infile)
# keep only edges based on XY refs
data_frame <- subset(data, refs_XY_AB > 0 )
# prepare edge attributes
edge_attributes = c("CTNG_hrm_level1", "CITED_hrm_level1", "refs_XY_AB")
network_data = data_frame[edge_attributes]
# creating the graph
network_graph <- graph.data.frame(network_data, dir=TRUE)
tc <- triad.census(network_graph)
tc
Thanks for your help. If you need more information please let me know.
Best,
Stefan
Stefan Wagner
TUSIAD/TCCI Chair in European Economic Integration
Associate Professor
ESMT European School of Management and Technology
Schlossplatz 1
10178 Berlin
Germany
Phone: +49 30 21231- 1537
Email: address@hidden
====================================================
ESMT. The business school founded by business.
====================================================ESMT European School of Management and Technology GmbH: Vorsitzender des Aufsichtsrats (Chairman of the Supervisory Board): Prof. Dr. Clemens Börsig
Geschäftsführung (Managing Directors): Prof. Jörg Rocholl, PhD (President), Georg Garlichs (CFO)
Sitz der Gesellschaft (Registered Office): Berlin
Registergericht (Register Court): Berlin Charlottenburg, HRB 87005
[Prev in Thread] | Current Thread | [Next in Thread] |