Skip to contents

sample_last_cit() creates a graph, where vertices age, and gain new connections based on how long ago their last citation happened.

Usage

sample_last_cit(
  n,
  edges = 1,
  ...,
  agebins = NULL,
  pref = NULL,
  directed = TRUE
)

last_cit(n, edges = 1, ..., agebins = NULL, pref = NULL, directed = TRUE)

sample_cit_types(
  n,
  edges = 1,
  types = NULL,
  ...,
  pref = NULL,
  directed = TRUE,
  attr = TRUE
)

cit_types(
  n,
  edges = 1,
  types = NULL,
  ...,
  pref = NULL,
  directed = TRUE,
  attr = TRUE
)

sample_cit_cit_types(
  n,
  edges = 1,
  types = NULL,
  ...,
  pref = NULL,
  directed = TRUE,
  attr = TRUE
)

cit_cit_types(
  n,
  edges = 1,
  types = NULL,
  ...,
  pref = NULL,
  directed = TRUE,
  attr = TRUE
)

Arguments

n

Number of vertices.

edges

Number of edges per step.

...

These dots are for future extensions and must be empty.

agebins

Number of aging bins. The default NULL uses n / 7100.

pref

Vector (sample_last_cit() and sample_cit_types() or matrix (sample_cit_cit_types()) giving the (unnormalized) citation probabilities for the different vertex types. The default NULL uses (1:(agebins + 1))^-3 for sample_last_cit() and all-one probabilities for the other two.

directed

Logical, whether to generate directed networks.

types

Vector of length ‘n’, the types of the vertices. Types are numbered from zero. The default NULL gives all vertices type zero.

attr

Logical, whether to add the vertex types to the generated graph as a vertex attribute called ‘type’.

Value

A new graph.

Details

sample_cit_cit_types() is a stochastic block model where the graph is growing.

sample_cit_types() is similarly a growing stochastic block model, but the probability of an edge depends on the (potentially) cited vertex only.

lastcit_game(), cited_type_game(), vcount(), citing_cited_type_game()

Author

Gabor Csardi csardi.gabor@gmail.com