Creates a probability model for a latent ordered network model
Creates a probability model for a latent ordered network model
createLatentOrderLikelihood(formula, theta =NULL)
Arguments
formula: A LOLOG formula. See link{lolog}
theta: Parameter values.
Returns
An Rcpp object representing the likelihood model
Examples
# See the methods of the objects returned by this functionUndirectedLatentOrderLikelihood
DirectedLatentOrderLikelihood
# A Barabasi-Albert type graph model with 1000 verticesel <- matrix(0, nrow=0, ncol=2)net <- new(UndirectedNet, el,1000L)lolik <- createLatentOrderLikelihood(net ~ preferentialAttachment(), theta=1)banet <- lolik$generateNetwork()$network # generate a random network from the modeldegrees <- banet$degree(1:1000)hist(degrees, breaks=100)# plot the degree distributionorder <- banet[["__order__"]]# The vertex inclusion order# Earlier nodes have higher degreeslibrary(ggplot2)qplot(order, degrees, alpha=I(.25))+ geom_smooth(method="loess")