Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ergm_model

Internal representation of an ergm network model


Description

These methods are generally not called directly by users, but may be employed by other depending packages. ergm_model constructs it from a formula. Each term is initialized via the InitErgmTerm functions to create a ergm_model object.

Usage

ergm_model(
  formula,
  nw = NULL,
  response = NULL,
  silent = FALSE,
  role = "static",
  ...,
  term.options = list()
)

## S3 method for class 'ergm_model'
c(...)

as.ergm_model(x, ...)

## S3 method for class 'ergm_model'
as.ergm_model(x, ...)

## S3 method for class 'formula'
as.ergm_model(x, ...)

## S3 method for class 'ergm_model'
is.curved(object, ...)

## S3 method for class 'ergm_model'
is.durational(object, ...)

## S3 method for class 'ergm_model'
is.dyad.independent(object, ...)

## S3 method for class 'ergm_model'
nparam(object, canonical = FALSE, offset = NA, byterm = FALSE, ...)

## S3 method for class 'ergm_model'
param_names(object, canonical = FALSE, ...)

Arguments

formula

An ergm() formula of the form network ~ model.term(s) or ~ model.term(s).

nw

The network of interest; if passed, the LHS of formula is ignored. This is the recommended usage.

response

Name of the edge attribute whose value is to be modeled in the valued ERGM framework. Defaults to NULL for simple presence or absence, modeled via a binary ERGM.

silent

logical, whether to print the warning messages from the initialization of each model term.

role

A hint about how the model will be used. Used primarily for dynamic network models.

...

additional parameters for model formulation

term.options

a list of optional settings such as calculation tuning options to be passed to the InitErgmTerm functions.

x

object to be converted to an ergm_model.

object

An ergm_model object.

canonical

Whether the canonical (eta) parameters or the curved (theta) parameters are used.

offset

If NA (the default), all model terms are counted; if TRUE, only offset terms are counted; and if FALSE, offset terms are skipped.

byterm

Whether to return a vector of the numbers of coefficients for each term.

Value

ergm_model returns an ergm_model object as a list containing:

coef.names

a vector of coefficient names

offset

a logical vector of whether each term was "offset", i.e. fixed

terms

a list of terms and 'term components' initialized by the appropriate InitErgmTerm.X function.

network.stats0

NULL always??

etamap

the theta -> eta mapping as a list returned from <ergm.etamap>

Methods (by generic)

  • c: A method for concatenating terms of two or more initialized models.

  • is.curved: Tests whether the model is curved.

  • is.durational: Test if the model has duration-dependent terms, which call for lasttoggle data structures.

  • is.dyad.independent: Tests whether the model is dyad-independent.

  • nparam: Number of parameters of the model.

  • param_names: Parameter names of the model.

Note

This API is not to be considered fixed and may change between versions. However, an effort will be made to ensure that the methods of this class remain stable.

See Also


ergm

Fit, Simulate and Diagnose Exponential-Family Models for Networks

v3.11.0
GPL-3 + file LICENSE
Authors
Mark S. Handcock [aut], David R. Hunter [aut], Carter T. Butts [aut], Steven M. Goodreau [aut], Pavel N. Krivitsky [aut, cre] (<https://orcid.org/0000-0002-9101-3362>), Martina Morris [aut], Li Wang [ctb], Kirk Li [ctb], Skye Bender-deMoll [ctb], Chad Klumb [ctb], Michał Bojanowski [ctb], Ben Bolker [ctb]
Initial release
2020-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.