igraph-help
[Top][All Lists]

## Re: [igraph] power law

 From: Gang Su Subject: Re: [igraph] power law Date: Mon, 07 Jul 2008 12:02:30 -0400 User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

```Hi Thiago,

Here's a quick wiki:
http://en.wikipedia.org/wiki/Goodness_of_fit

```
If you have n bins of degrees, your goodness of fit will have n-1 degrees of freedom on chi-square distribution. What you want to do, is you will have an alpha after the fitting, so your pwr law dist will look like
```
f(x) = x to the pwr of (-alpha)

```
you plug in x = 1, 2, 3, 4, 5, 6... and you will have f(x), you multiply f(x) with the total number of degrees (2*num of edges), you may round
```up or not, then that's the expected values

your actual degree counts will be observed

look up
chisq.test and ks.test in R,

plug in the obs and exp
then you will have a p-value

you can also measure by residuals, or other statistics

Gang

Thiago M. Venancio wrote:
```
```Hi Gang,

Could you possibly give more details on the goodness of fit test ?

Best.

Thiago

On Mon, Jul 7, 2008 at 11:34 AM, Gang Su <address@hidden> wrote:
```
```Hi Thiago,

I am not a developer, i don't think there's a straight forward way to
measure goodness of fit.
But you can always do the r squared or goodness of fit test on your own,
just take the observed
degree values and expected degree values, and plugin the goodness of fit
test.

Gang

Thiago M. Venancio wrote:
```
```Hi all,

Given a degree distribution of a graph, is there any straightforward
way to assess the likelihood/significance of the fitness using iGraph
(e.g compare with other non power law distributions ?

Thiagp

_______________________________________________
igraph-help mailing list
http://lists.nongnu.org/mailman/listinfo/igraph-help

```
```
_______________________________________________
igraph-help mailing list
http://lists.nongnu.org/mailman/listinfo/igraph-help

```
```

_______________________________________________
igraph-help mailing list
```