plot.gofobject
plots diagnostics such as the
degree distribution, geodesic distances, shared partner distributions,
and reachability for the goodness-of-fit of exponential family random graph
models. See ergm
for more information on these models.## S3 method for class 'gofobject':
plot(x, \dots,
cex.axis=0.7, plotlogodds=FALSE,
main = "Goodness-of-fit diagnostics",
normalize.reachability=FALSE,
verbose=FALSE)
gofobject
,
typically produced by the
gof.ergm
or gof.formula
functions.
See the documentation for gof.ergm
produces a sample of networks randomly drawn from the specified model.
This function produces a plot of the summary measures.#
data(florentine)
#
# test the gof.ergm function
#
gest <- ergm(flomarriage ~ edges + kstar(2))
gest
summary(gest)
#
# Plot the probabilities first
#
gofflo <- gof(gest)
gofflo
plot(gofflo)
#
# And now the odds
#
plot(gofflo, plotlogodds=TRUE)
#
# Use the formula version
#
gof(flomarriage ~ edges + kstar(2), coef=c(-1.6339, 0.0049))
Run the code above in your browser using DataLab