network.size<- 2000
network.density<- 0.002
neighbour.count<- lapply(seq(1, network.size), function(x) rbinom(1, network.size, network.density))
Njs<- table(unlist(neighbour.count[neighbour.count>0]))
theta<- 1
beta<- 9e-8
degree.sampled.vec<- generate.sample(theta = theta, Njs = Njs, beta = beta, sample.length = 5000)
plot(degree.sampled.vec, type='h')Run the code above in your browser using DataLab