ergm_model: Internal representation of an 'ergm' network model

Description Usage Arguments Value Methods (by generic) Note See Also

View source: R/ergm_model.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
ergm_model(
  formula,
  nw = NULL,
  silent = FALSE,
  ...,
  term.options = list(),
  extra.aux = list(),
  env = globalenv(),
  offset.decorate = TRUE
)

## 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.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, offset = NA, ...)

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.

silent

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

...

additional parameters for model formulation

term.options

A list of additional arguments to be passed to term initializers. See ? term.options.

extra.aux

a list of auxiliary request formulas required elsewhere; if named, the resulting slots.extra.aux will also be named.

env

a throwaway argument needed to prevent conflicts with some usages of ergm_model. The initialization environment is always taken from the formula.

offset.decorate

logical; whether offset coefficient and parameter names should be enclosed in "offset()".

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

terms

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

etamap

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

Methods (by generic)

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

summary.ergm_model()


ergm documentation built on June 21, 2021, 9:07 a.m.