For the archives.

---------- Forwarded message ----------
From: Gábor Csárdi <[email protected]>
Date: Wed, May 28, 2014 at 11:09 PM
Subject: Re: [igraph] triad.census(): negative 003 counts
To: "Wagner, Stefan" <[email protected]>


Hi Stefan,

this is simply an integer overflow. The number of 003 triads is bigger than
what we can represent in an integer on the computer (using the default
'int' data type).

You can simply calculate the result as the difference of all triads and the
rest of the triad census counts.

Of course this is still a bug in igraph, we'll fix it or at least give a
warning:
https://github.com/igraph/igraph/issues/625

Best,
Gabor


On Wed, May 28, 2014 at 10:07 PM, Wagner, Stefan <[email protected]>wrote:

>  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: [email protected]
>
> ====================================================
> [image: 
> cid:[email protected]]<http://www.facebook.com/ESMT.org>[image:
> cid:[email protected]]<https://plus.google.com/105147226671861147983/posts>
>  [image: cid:[email protected]]<http://twitter.com/esmtberlin>
>  [image: 
> cid:[email protected]]<http://www.linkedin.com/company/esmt>
>  [image: 
> cid:[email protected]]<https://www.xing.com/companies/esmt>
>  [image: 
> cid:[email protected]]<http://www.youtube.com/esmtberlin>
>  [image: 
> cid:[email protected]]<http://itunes.apple.com/de/institution/esmt-european-school-management/id437460123>
>  [image: cid:[email protected]] <http://blog.esmt.org/> [image:
> cid:[email protected]]<http://www.esmt.org/eng/media-center/rss-feeds/>
>  [image: 
> cid:[email protected]]<http://www.esmt.org/eng/media-center/>
>  [image: cid:[email protected]] <http://www.esmt.org/en/home>
>
>
>
> *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
>
>
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to