# A three-node empty directed network
net <- network.initialize(3, directed=TRUE)
# In homogeneous Bernoulli model with odds of a tie of 1/5 all ties are
# equally likely
predict(net ~ edges, log(1/5))
# Let's add a tie so that `net` has 1 tie out of possible 6 (so odds of 1/5)
net[1,2] <- 1
# Fit the model
fit <- ergm(net ~ edges)
# The p's should be identical
predict(fit)
Run the code above in your browser using DataLab