gof_cergm: Conduct Goodness-Of-Fit Diagnostics On A Citation Exponential...

Description Usage Arguments Author(s) References Examples

Description

A function to perform goodness-of-fit diagnostics for CERGMs using the indegree distribution, outdegree distribution, edgewise-shared partners OST distribution, and edgewise-shared partners OSP distribution. This function depends on the ergm-package.

Usage

1
2
3
gof.cERGM(object, N=500, control=control.simulate.ergm(MCMC.interval=1024),
                     max.idegree=20, max.odegree=20, max.esp.ost=20, max.esp.osp=20,
                     cex.axis=NULL, cex.lab=NULL, cex.main=NULL, ...)

Arguments

object

A cERGM object

N

Number of networks to simulate for the Goodness-of-fit diagnostic. Defaul is N=500.

control

A list of control parameters for algorithm tuning. See control.simulate.ergm

max.idegree

The maximum indegree value to be visualized

max.odegree

The maximum outdegree value to be visualized

max.esp.ost

The maximum ESP OST value to be visualized

max.esp.osp

The maximum ESP OSP value to be visualized

Author(s)

Christian Schmid <songhyo86@gmail.com>

References

Hunter D, Goodreau S, Handcock M (2008). Goodness of Fit of Social Networks Journal of American Statistical Association, 103(481), 248-258.

Hunter D, Handcock M, Butts C, Goodreau S, Morris M (2008). ergm: A Package to Fit, Simulate and Diagnose Exponential-Family Models for Networks. Journal of Statistical Software, 24(3), 1-29.

Schmid C, Chen T, Desmarais B (2020). Generative Dynamics of Supreme Court Citations: Analysis with a New Statistical Network Model.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# load Supreme Court Citation Network from 1936-1941
data("scc_1936_1941")

# get vertex attribute "Term". Indicates the Term of each node
terms <- get.vertex.attribute(scc_1936_1941, "Term")

# create a matrix with the sender's term in each row
terms.matrix <- matrix(terms,length(terms),length(terms),byrow=F)

# fix all dyads that can potentially be created in 1941 as 1
unfixed.dyads <- 1*(terms.matrix == 1941)


# alternatively one can also add an unfixed vector that indicates
# which nodes can create edges
unfixed.vector<-  1*(terms==1941)

# test cergm-function
model <- cergm(scc_1936_1941~ edges+ difftransties("Term")+ nodeicov("NumberJusticesPro"),
            not.fixed=unfixed.dyads, estimate="MPLE", init.method="SAN")

gof.cERGM(model)

schmid86/cERGM documentation built on Sept. 10, 2021, 6:20 p.m.