Learn R Programming

mixer (version 0.2)

graph.affiliation: Simulation of an Affiliation Graph

Description

Simulation an affiliation Graph with a given number of cluster, specific proportions and within between probabilies of connection

Usage

graph.affiliation(n=100,alphaVect=c(1/2,1/2),lambda=0.7,epsilon=0.05)

Arguments

n
Number of nodes of the simulated Graph
alphaVect
Vector of proportions of the clusters
lambda
Within-cluster probability of edge
epsilon
Between-clusters probability of edge

Value

  • graph.affiliation returns a list of 2 objects
  • xA adjacency matrix of size n by n
  • clusterA vector of integers indicating the cluster to which each node is allocated

encoding

latin1

Details

graph.affiliation simulate a simple Erdos-Renyi Mixture of Graph model, using the same within-cluster probability for all cluster and a unique between-cluster edge probability.

Examples

Run this code
graph.affiliation(n=100,c(1/3,1/3,1/3),0.8,0.2)->g
str(g)

Run the code above in your browser using DataLab