Learn R Programming

btergm (version 1.9.13)

checkdegeneracy: Degeneracy check for btergm and mtergm objects

Description

Assess degeneracy of btergm and mtergm models.

Usage

# S4 method for mtergm
checkdegeneracy(object, ...)

# S4 method for btergm checkdegeneracy(object, nsim = 1000, MCMC.interval = 1000, MCMC.burnin = 10000, verbose = FALSE)

# S3 method for degeneracy print(x, center = FALSE, t = 1:length(x$sim), terms = 1:length(x$target.stats[[1]]), ...)

# S3 method for degeneracy plot(x, center = TRUE, t = 1:length(x$sim), terms = 1:length(x$target.stats[[1]]), vbar = TRUE, main = NULL, xlab = NULL, target.col = "red", target.lwd = 3, ...)

Arguments

object

A btergm or mtergm object, as estimated using the btergm or mtergm function.

nsim

The number of networks to be simulated at each time step. This number should be sufficiently large for a meaningful comparison. If possible, much more than 1,000 simulations.

MCMC.burnin

Internally, this package uses the simulation facilities of the ergm package to create new networks against which to compare the original network(s) for goodness-of-fit assessment. This argument sets the MCMC burnin to be passed over to the simulation command. The default value is 10000. There is no general rule of thumb on the selection of this parameter, but if the results look suspicious (e.g., when the model fit is perfect), increasing this value may be helpful.

MCMC.interval

Internally, this package uses the simulation facilities of the ergm package to create new networks against which to compare the original network(s) for goodness-of-fit assessment. This argument sets the MCMC interval to be passed over to the simulation command. The default value is 1000, which means that every 1000th simulation outcome from the MCMC sequence is used. There is no general rule of thumb on the selection of this parameter, but if the results look suspicious (e.g., when the model fit is perfect), increasing this value may be helpful.

verbose

Print details?

x

A degeneracy object created by the checkdegeneracy function.

center

If TRUE, print/plot the simulated minus the target statistics, with an expected value of 0 in a non-degenerate model. If FALSE, print/plot the distribution of simulated statistics and show the target statistic separately.

t

Time indices to include, e.g., t = 2:4 for time steps 2 to 4.

terms

Indices of the model terms to include, e.g., terms = 1:3 includes the first three statistics.

vbar

Show vertical bar for target statistic in histogram.

main

Main title of the plot.

xlab

Label on the x-axis. Defaults to the name of the statistic.

target.col

Color of the vertical bar for the target statistic. Defaults to red.

target.lwd

Line width of the vertical bar for the target statistic. Defaults to 3.

...

Arbitrary further arguments.

Details

The methods for the generic degeneracy function implement a degeneracy check for btergm and mtergm objects. For btergm, this works by comparing the global statistics of simulated networks to those of the observed networks at each observed time step. If the global statistics differ significantly, this is indicated by small p-values. If there are many significant results, this indicates degeneracy. For mtergm, the mcmc.diagnostics function from the ergm package is used.

References

Hanneke, Steve, Wenjie Fu and Eric P. Xing (2010): Discrete Temporal Models of Social Networks. Electronic Journal of Statistics 4: 585--605.

Leifeld, Philip, Skyler J. Cranmer and Bruce A. Desmarais (2017): Temporal Exponential Random Graph Models with btergm: Estimation and Bootstrap Confidence Intervals. Journal of Statistical Software 83(6): 1-36. http://dx.doi.org/10.18637/jss.v083.i06.

See Also

btergm-package btergm gof