Learn R Programming

latentnet (version 0.7-17)

summary.gofobject: Summaries the Goodness-of-Fit Diagnostics on a Latent Space Graph Model

Description

summary.gofobject summaries the diagnostics such as the degree distribution, geodesic distances, shared partner distributions, and reachability for the goodness-of-fit of Latent Space random graph models. See ergmm for more information on these models.

Usage

## S3 method for class 'gofobject':
summary(object, \dots)

Arguments

object
an object of class gofobject, typically produced by the gof.ergmm or gof.formula functions. See the documenta
...
Additional arguments, to be passed to the plot function.

Value

  • none

Details

gof.ergmm produces a sample of networks randomly drawn from the specified model. This function produces a print out the summary measures.

See Also

gof.ergmm, ergmm, network, rergm

Examples

Run this code
#
# Using Sampson's Monk data, lets fit a 
# simple latent position model
#
data(sampson)
#
# Get the group labels
#
group <- get.vertex.attribute(samplike,"group")
samp.labs <- substr(group,1,1)
#
samp.fit <- ergmm(samplike ~ latent(k=2), burnin=10000,
                 MCMCsamplesize=2000, interval=30)
#
# Posterior Predictive Checks
gofsamplike <- gof.ergmm(samp.fit)
summary(gofsamplike)
#
# Place all three on the same page
# with nice margins
#
par(mfrow=c(1,3))
par(oma=c(0.5,2,1,0.5))
#
plot(gofsamplike)
#
# And now the odds 
#
plot(gofsamplike, plotodds=TRUE)
#
# Using Sampson's Monk data, lets fit a latent clustering model
#
samp.fit <- ergmm(samplike ~ latentcluster(k=2, ngroups=3), burnin=10000,
                 MCMCsamplesize=2000, interval=30)
#
# Posterior Predictive Checks
gofsamplike <- gof.ergmm(samp.fit)
summary(gofsamplike)
#
# Place all three on the same page
# with nice margins
#
par(mfrow=c(1,3))
par(oma=c(0.5,2,1,0.5))
#
plot(gofsamplike)
#
# And now the odds 
#
plot(gofsamplike, plotodds=TRUE)

Run the code above in your browser using DataLab