bgof {Bergm} | R Documentation |
Bayesian goodness-of-fit diagnostics for ERGMs
Description
Function to calculate summaries for degree, minimum geodesic distances, and edge-wise shared partner distributions to diagnose the Bayesian goodness-of-fit of exponential random graph models.
Usage
bgof(
x,
sample.size = 100,
aux.iters = 10000,
n.deg = NULL,
n.dist = NULL,
n.esp = NULL,
n.ideg = NULL,
n.odeg = NULL,
...
)
Arguments
x |
an |
sample.size |
count; number of networks to be simulated and compared to the observed network. |
aux.iters |
count; number of iterations used for network simulation. |
n.deg |
count; used to plot only the first
|
n.dist |
count; used to plot only the first
|
n.esp |
count; used to plot only the first
|
n.ideg |
count; used to plot only the first
|
n.odeg |
count; used to plot only the first
|
... |
additional arguments, to be passed to lower-level functions. |
References
Caimo, A. and Friel, N. (2011), "Bayesian Inference for Exponential Random Graph Models," Social Networks, 33(1), 41-55. https://arxiv.org/abs/1007.5192
Caimo, A. and Friel, N. (2014), "Bergm: Bayesian Exponential Random Graphs in R," Journal of Statistical Software, 61(2), 1-25. https://www.jstatsoft.org/v61/i02
Examples
## Not run:
# Load the florentine marriage network
data(florentine)
# Posterior parameter estimation:
p.flo <- bergm(flomarriage ~ edges + kstar(2),
burn.in = 50,
aux.iters = 500,
main.iters = 1000,
gamma = 1.2)
# Bayesian goodness-of-fit test:
bgof(p.flo,
aux.iters = 500,
sample.size = 30,
n.deg = 10,
n.dist = 9,
n.esp = 6)
## End(Not run)