ergmuserterms-package {ergm}R Documentation

Add Statistics Terms for the 'ergm' Package

Description

The ergm package is capable of fitting a wide range of exponential random network models, in which the probability of a given network, y, on a set of nodes is \exp(θ{\cdot}g(y))/c(θ), where g(y) is a vector of network statistics, θ is a parameter vector of the same length and c(θ) is the normalizing constant for the distribution. The ergm function fits these models when they are expressed via an R formula object, of the form y ~ <model terms>, where y is a network object or a matrix that can be coerced to a network object. To create a network object in R, use the network() function, then add nodal attributes to it using the %v% operator if necessary.

The ergm package contains a wide range of terms. For the details on the possible <model terms>, see ergm-terms.

This package can be modified by users to add user-defined terms to ergm models. The terms can be used throughout the ergm package and behave identically to the supplied terms.

Details

The ergmuserterms package is available from the statnet website (http://statnetproject.org).

The code contains some simple examples and templates. These include:

In the implementation of ergm, the model is initialized in R, then all the model information is passed to a C program that generates the sample of graph statistics using MCMC. This sample is then returned to R, which then approximates the MLE.

See Also

ergm, network, ergm-terms

Examples

## Not run: 
library(ergmuserterms)
data(sampson)
monk.fit <- ergm(samplike~m2star)
summary(monk.fit)

monk.fit <- ergm(samplike ~ m2star + testme)
summary(monk.fit)

## End(Not run)

[Package ergm version 2.4-3 Index]