Function to simulate networks from the LSM model
simulateLSM(object, Y = NULL, nsim = 100, seed, directed = NULL)
object | object of class |
---|---|
Y | ( |
nsim | number of simulations. Default |
seed | for simulations |
directed | if the network is directed or not. Default |
n <- 20 Y <- network(n, directed = FALSE)[,] modLSM <- lsm(Y, D = 2) Ysim <- simulateLSM(modLSM, Y = Y, nsim = 8) # store EZ, to keep the nodes in the same positions # and compare the networks EZ <- modLSM$lsmEZ par(mfrow = c(3,3)) plotY(Y, EZ = EZ, main = "Original Data") for(i in 1:8) plotY(Ysim[[i]], EZ = EZ, main = paste("Simulation" , i))