[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] errors using power.law.fit

From: Martin Tomko
Subject: Re: [igraph] errors using power.law.fit
Date: 16 Nov 2010 11:07:51 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3

hi Tamas,
thanks for your response. How would one call the C code from R? I may be able to install the C library. I would then have to somehow link it to my R installation and send it the graph object or the matrix with degrees that I get as result of degree(g), and get back an indication that I can or cannot fit it with the power.law.fit function, right?

Or would the C method do the Kolmorgov-Smirnov test AND the fitting. thus if I wanted to do it all in R, I just use a standard Kolmorgov-Smirnov?

Also, the article seems to imply - in the recipe part - that you estimate the alpha and Xmin parameters, and then test with the Kolmorgov Smirnov test for goodness of fit. Now, this implies that I still may run into troubles with the optim() error I got our of R. would you have any suggestion how to get rid of that?


On 11/16/2010 10:07 AM, Tamas Nepusz wrote:
Dear Martin,

Now, it is possible that some of the graphs I have would not fit a power law 
well - is there a recommended way for checking whether it makes sense at all to 
try fitting one?
You can use a Kolmogorov-Smirnov test for that, as outlined here:


There is also a plain C implementation of their method which will eventually be 
integrated with igraph (once I find time for it). Currently it is a separate 
project, but it works from the command line, so you can simply call out from R 
to this implementation if you want to do batch processing:


(Instructions: download, cmake, make, make install).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]