Learn R Programming

tergm (version 3.3.1)

stergm: Separable Temporal Exponential Family Random Graph Models

Description

stergm is used for finding Separable Temporal ERGMs' (STERGMs) Conditional MLE (CMLE) (Krivitsky and Handcock, 2010) and Equilibrium Generalized Method of Moments Estimator (EGMME) (Krivitsky, 2009).

Usage

stergm (nw, 
          formation, 
          dissolution,
          constraints = ~.,
          estimate, 
          times=NULL, 
          offset.coef.form=NULL, 
          offset.coef.diss=NULL,
          targets=NULL, 
          target.stats=NULL,
          eval.loglik=TRUE,
          control=control.stergm(),
          verbose=FALSE, 
          ...)

Arguments

nw
A network object (for EGMME); or networkDynamic object, a network.list
formation, dissolution
One-sided ergm-style formulas for the formation and dissolution models, respectively.
constraints
A one-sided formula specifying one or more constraints on the support of the distribution of the networks being modeled, using syntax similar to the formula argument. Multiple constraints may be given, separated by +
estimate
One of "EGMME" for Equilibrium Generalized Method of Moments Estimation, based on a single network with some temporal information and making an assumption that it is a product of a STERGM process running to its stationary (equilibrium) distrib
times
For CMLE and CMPLE estimation, times or indexes at which the networks whose transition is to be modeled are observed. Default to c(0,1) if nw is a networkDyna
offset.coef.form
Numeric vector to specify offset formation parameters.
offset.coef.diss
Numeric vector to specify offset dissolution parameters.
targets
One-sided ergm-style formula specifying statistics whose moments are used for the EGMME. Unused for CMLE and CMPLE. Targets is required for EGMME estimation. It may contain any valid ergm terms. If specifi
target.stats
A vector specifying the values of the targets statistics that EGMME will try to match. Defaults to the statistics of nw. Unused for CMLE and CMPLE.
eval.loglik
Whether or not to calculate the log-likelihood of a CMLE STERGM fit. See ergm for details.
control
A list of control parameters for algorithm tuning. Constructed using control.stergm.
verbose
logical or integer; if TRUE or positive, the program will print out progress information. Higher values result in more output.
...
Additional arguments, to be passed to lower-level functions.

Value

  • stergm returns an object of class stergm that is a list consisting of the following elements: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] See the method print.stergm for details on how an stergm object is printed. Note that the method summary.stergm returns a summary of the relevant parts of the stergm object in concise summary format.

Details

Model Terms See ergm and ergm-terms for details. At this time, only linear ERGM terms are allowed.
  • For a brief demonstration, please see the tergm package vignette:browseVignettes(package='tergm')
A more detailed tutorial is avalible on the statnet wiki: http://statnet.csde.washington.edu/workshops/SUNBELT/current/tergm/tergm_tutorial.pdf For more usage examples, see the wiki page at https://statnet.csde.washington.edu/trac/wiki/tergmUsage

References

  • Krivitsky PN, Handcock MS (2010). A Separable Model for Dynamic Networks.http://arxiv.org/abs/1011.1937
  • Krivitsky, P.N. (2012). Modeling of Dynamic Networks based on Egocentric Data with Durational Information.Pennsylvania State University Department of Statistics Technical Report, 2012(2012-01).http://stat.psu.edu/research/technical-report-files/2012-technical-reports/modeling-of-dynamic-networks-based-on-egocentric-data-with-durational-information

See Also

ergm, network, %v%, %n%, ergm-terms

Examples

Run this code
# EGMME Example
par(ask=FALSE)
n<-30
g0<-network.initialize(n,dir=FALSE)

#                     edges, degree(1), mean.age
target.stats<-c(      n*1/2,    n*0.6,        20)

dynfit<-stergm(g0,formation = ~edges+degree(1), dissolution = ~edges,
               targets = ~edges+degree(1)+mean.age,
               target.stats=target.stats, estimate="EGMME",
               control=control.stergm(SA.plot.progress=TRUE))

par(ask=TRUE)
mcmc.diagnostics(dynfit)
summary(dynfit)

# CMLE Example
data(samplk)

# Fit a transition from Time 1 to Time 2
samplk12 <- stergm(list(samplk1, samplk2),
                   formation=~edges+mutual+transitiveties+cyclicalties,
                   dissolution=~edges+mutual+transitiveties+cyclicalties,
                   estimate="CMLE")

mcmc.diagnostics(samplk12)
summary(samplk12)

# Fit a transition from Time 1 to Time 2 and from Time 2 to Time 3 jointly
samplk123 <- stergm(list(samplk1, samplk2, samplk3),
                    formation=~edges+mutual+transitiveties+cyclicalties,
                    dissolution=~edges+mutual+transitiveties+cyclicalties,
                    estimate="CMLE")

mcmc.diagnostics(samplk123)
summary(samplk123)

Run the code above in your browser using DataLab