Description Usage Arguments Details References Examples

View source: R/HierarchicalModels.R

This model has a power law of the degree distribution with a
parameter *alpha* and is tuned to a desired link
existence probability. It is based on a fitness model.

1 | ```
Model.p.Fitness.Servedio(n, alpha, meandegree, sdprop = 0.1)
``` |

`n` |
dimension of matrix. |

`alpha` |
exponent for power law. Must be <=-1. |

`meandegree` |
overall mean degree (expected degree divided by number of nodes). Must be in (0,1). |

`sdprop` |
standard deviation of updated steps. |

Every node *i* has a fitness *theta_i* being an
independent realisation of a U[0,1] distribution. The probability
of a link between a node with fitness x and a node with fitness y
is g(x)g(y) where g is as follows. If *alph=-1a*
then

*g(x)=g0*exp(-log(g0)*x)*

Otherwise,

*g(x)=(g0^(α+1)+(1-g0^(α+1))*x)^(1/(α+1))*

where *g0* is tuned numerically to achieve the desired
overall mean degree.

Updating of the model parameters in the MCMC setup is done via a
Metropolis-Hastings step, adding independent centered normal random
variables to each node fitness in *theta*.

Servedio V. D. P. and Caldarelli G. and Butta P. (2004)
Vertex intrinsic fitness: How to produce arbitrary scale-free networks.
*Physical Review E* 70, 056126.

1 2 3 4 5 6 7 8 | ```
n <- 5
mf <- Model.p.Fitness.Servedio(n=n,alpha=-2.5,meandegree=0.5)
m <- Model.Indep.p.lambda(model.p=mf,
model.lambda=Model.lambda.GammaPrior(n,scale=1e-1))
x <- genL(m)
l <- rowSums(x$L)
a <- colSums(x$L)
res <- sample_HierarchicalModel(l,a,model=m,nsamples=10,thin=10)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.