Learn R Programming

ergm (version 3.9.4)

ergm.eta: Operations to map curved ergm() parameters onto canonical parameters

Description

The ergm.eta function calculates and returns eta, mapped from theta using the etamap object created by ergm.etamap.

The ergm.etagrad function caculates and returns the gradient of eta mapped from theta using the etamap object created by ergm.etamap. If the gradient is only intended to be a multiplier for some vector, the more efficient ergm.etagradmult is recommended.

The ergm.etagradmult function calculates and returns the product of the gradient of eta with a vector v.

The ergm.etamap function takes a model object and creates a mapping from the model parameters, theta, to the canonical (linear) eta parameters; the mapping is carried out by ergm.eta.

Usage

ergm.eta(theta, etamap)

ergm.etagrad(theta, etamap)

ergm.etagradmult(theta, v, etamap)

ergm.etamap(model)

Arguments

theta

the curved model parameters

etamap

the list of values that constitutes the theta-> eta mapping and is returned by ergm.etamap

v

a vector of the same length as the vector of mapped eta parameters

model

model object, as returned by ergm_model

Value

For ergm.eta, the canonical eta parameters as mapped from theta.

For ergm.etagrad, a matrix of the gradient of eta with respect to theta.

For ergm.etagradmult, the vector that is the product of the gradient of eta and v; infinite values are replaced by (+-)10000.

For ergm.etamap, a data structure describing the theta-to-eta mapping given by a list of the following:

canonical

a numeric vector whose ith entry specifies whether the ith component of theta is canonical (via non-negative integers) or curved (via zeroes)

offsetmap

a logical vector whose i'th entry tells whether the ith coefficient of the canonical parameterization was "offset", i.e fixed

offset

a logical vector whose ith entry tells whether the ith model term was offset/fixed

offsettheta

a logical vector whose ith entry tells whether the ith curved theta coeffient was offset/fixed;

curved

a list with one component per curved EF term in the model containing

from

the indices of the curved theta parameter that are to be mapped from

to

the indices of the canonical eta parameters to be mapped to

map

the map provided by <InitErgmTerm>

gradient

the gradient function provided by InitErgmTerm

cov

optional additional covariates to be passed to the map and the gradient functions

etalength

the length of the eta vector

Details

These functions are mainly important in the case of curved exponential family models, i.e., those in which the parameter of interest (theta) is not a linear function of the natural parameters (eta) in the exponential-family model. In non-curved models, we may assume without loss of generality that eta(theta)=theta.

A succinct description of how eta(theta) is incorporated into an ERGM is given by equation (5) of Hunter (2007). See Hunter and Handcock (2006) and Hunter (2007) for further details about how eta and its derivatives are used in the estimation process.

References

  • Hunter, D. R. and M. S. Handcock (2006). Inference in curved exponential family models for networks. Journal of Computational and Graphical Statistics, 15: 565--583.

  • Hunter, D. R. (2007). Curved exponential family models for social networks. Social Networks, 29: 216--230.

See Also

ergm-terms