Description Usage Arguments Author(s) References Examples
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.
1 2 3 |
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 |
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 |
Christian Schmid <songhyo86@gmail.com>
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.