cergm: Citation Exponential Random Graph Models

Description Usage Arguments Author(s) References Examples

View source: R/cergm.R

Description

Function for citation exponential random graph models. This function depends on the ergm-package and the network-package.

Usage

1
2
cergm(formula, not.fixed, estimate="MCMLE", init.method="SAN" ,
control=control.ergm(init=NULL), eval.loglik=TRUE, ...)

Arguments

formula

Formula for the ERGM. Model construction works like in the ergm package with the same model terms etc.)

not.fixed

Either a matrix of 1s and 0s indicating the dyads that are not fixed in the model, or a vector of 1s and 0s indicating the nodes in the network that have unfixed dyads, or a network object where an edge indicates that this dyad is unfixed.

estimate

If "MPLE," then the maximum pseudolikelihood estimator is returned. If "MLE" (the default), then an approximate maximum likelihood estimator is returned. If "CD", the Monte-Carlo contrastive divergence estimate is returned.

init.method

If "SAN", the MCMLE algorithm is being initialized using Simulated Annealing. If "Bernoulli", the MCMLE algorithm is being initialized using the MPLE. If "CD", Contrastive Divergence is being used to start the algorithm.

control

Controls for the ergm function in the ergm-package. See control.ergm for details.

eval.loglik

Logical: For dyad-dependent models, if TRUE, use bridge sampling to evaluate the log-likelihoood associated with the fit. Has no effect for dyad-independent models. Since bridge sampling takes additional time, setting to FALSE may speed performance if likelihood values (and likelihood-based values like AIC and BIC) are not needed.

Author(s)

Christian S. Schmid <songhyo86@gmail.com>

References

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")

summary.cERGM(model)

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