[Top][All Lists]

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

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

From: Gábor Csárdi
Subject: Re: [igraph] errors using power.law.fit
Date: Tue, 16 Nov 2010 11:14:37 +0100


On Tue, Nov 16, 2010 at 9:58 AM, Martin Tomko <address@hidden> wrote:
> Dear all,
> I am running a batch process on a few hundreds graphs, and trying to get
> their power.law.fit exponents. Every now and then I get an error:
> Error in optim(start, f, method = method, hessian = TRUE, ...) :
>  non-finite finite-difference value [1]
> Which I assume arises from the use of power.law.fit - google seems to imply
> that optim() is related to statistical fitting.

you don't need google for this, the source code and documentation is all there.

Look at the source code of 'power.law.fit' and then you see it calls
'mle' from the 'stats4' package, which in turn calls 'optim'.  The
manual page of these functions explain that additional arguments to
'power.law.fit' are passed to 'mle' and then to 'optim', so you can
try another, more robust optimization method, e.g. BFGS easily:

power.law.fit(..., method="BFGS")


> 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?
> Thanks,
> Martin
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help

Gabor Csardi <address@hidden>     UNIL DGM

reply via email to

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