igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Assortative mixing


From: Gábor Csárdi
Subject: Re: [igraph] Assortative mixing
Date: Tue, 8 Nov 2011 11:00:22 -0500

On Tue, Nov 8, 2011 at 5:21 AM, Thomas <address@hidden> wrote:
> Does anyone have any guidance on the interpretation of the assortative
> coefficient (R code copied below)? Can it be assessed for significance as
> Pearson's r can? And if so, is the sample size the number of nodes in the
> network? Newman explains his approach in Column 1, Page 3 here:
> http://arxiv.org/pdf/cond-mat/0209450v2 but I couldn't follow it.

Newman suggests some resampling here. Jackknife basically means that
you leave out one (or more) edges from the computation of the
assortativity coefficient, and calculate confidence intervals from
these subsamples.
See e.g. http://en.wikipedia.org/wiki/Resampling_(statistics)
and various R packages.

Best,
Gabor

> Thank you!
>
> Thomas
>
> #Code copied from: http://igraph.wikidot.com/r-recipes
> #Assortativity coefficient in R
>
> assortativity <- function(graph){
>    deg <- degree(graph)
>    deg.sq <- deg^2
>    m <- ecount(graph)
>    num1 <- 0; num2 <- 0; den <- 0
>    edges <- get.edgelist(graph, names=FALSE)+1
>
>    num1 <- sum(deg[edges[,1]] * deg[edges[,2]]) / m
>    num2 <- (sum(deg[edges[,1]] + deg[edges[,2]]) / (2 * m))^2
>    den <- sum(deg.sq[edges[,1]] + deg.sq[edges[,2]]) / (2 * m)
>
>    return((num1-num2)/(den-num2))
>    }
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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