igraph-help
[Top][All Lists]
Advanced

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

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


From: Tamas Nepusz
Subject: Re: [igraph] errors using power.law.fit
Date: Tue, 16 Nov 2010 10:20:20 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Martin,

> thanks for your response. How would one call the C code from R?
The C code compiles into an executable that you can just call from R
like any other command-line program using system(). So, basically, you
dump the degree distribution to a file, call plfit using system() and
that file as an input, store the output in an R string and then parse
it.

But actually, I was stupid, the authors of that paper have a working
R code here:

http://tuvalu.santafe.edu/~aaronc/powerlaws/

> 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.
Apparently not, the R code linked above does not use optim(), it uses
some other calculation that seems to give a MLE of alpha given xmin
using an exact formula.

-- 
Tamas



reply via email to

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