plot.gofobject {latentnetHRT}R Documentation

Plot Goodness-of-Fit Diagnostics on a Latent Space Random Graph Model

Description

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

Usage

## S3 method for class 'gofobject':
plot(x, ...,
         cex.axis=0.7, plotodds=FALSE,
         main = "Goodness-of-fit diagnostics",
         normalize.reachability=FALSE,
         verbose=FALSE)

Arguments

x an object of class gofobject, typically produced by the gof.ergmm or gof.formula functions. See the documentation for these.
cex.axis Character expansion of the axis labels relative to that for the plot.
plotodds Plot the odds of a dyad having given characteristics (e.g., reachability, minimum geodesic distance, shared partners). This is an alternative to the probability of a dyad having the same property.
main Title for the goodness-of-fit plots.
normalize.reachability Should the reachability proportion be normalized to make it more comparable with the other geodesic distance proportions.
verbose Provide verbose information on the progress of the plotting.
... Additional arguments, to be passed to the plot function.

Details

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

Value

none

See Also

ergm, network, rergm.ergmm, summary.ergmm

Examples

## Not run: 
#
# 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)
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)
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)
## End(Not run)

[Package latentnetHRT version 0.7-18 Index]