R: Internal Functions to Prepare Data for ergm's C Interface

ergm_Clist {ergm} | R Documentation

## Internal Functions to Prepare Data for ergm's C Interface

### Description

These are internal functions not intended to be called by end users. `ergm_Clist` collates the information in the given object into a form suitable for being passed to the C routines.

The `ergm.Cprepare` is a legacy function that constructs a combination of `ergm_Clist`s from the given `network` and the given `ergm_model`.

`ergm.design` obtain the set of informative dyads based on the network structure. Note that `model=` argument is not needed and will be removed in a future release.

### Usage

    ergm_Clist(object, ...)

    ergm.Cprepare(nw, m, response = NULL)

    ## S3 method for class 'network'
    ergm_Clist(object, response = NULL, ...)

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

    ergm.design(nw, verbose = FALSE)

### Arguments

`object` | object to be collated.
`...` | additional arguments for methods.
`nw` | a network or similar object
`m` | a model object, as returned by `ergm_model`
`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.
`verbose` | logical, whether the design matrix should be printed; default=FALSE

### Value

A list of class `"ergm_Clist"` and possibly a subclass `"ORIGINAL.ergm_Clist"` containing some subset of the following elements:

`n` | the size of the network
`dir` | whether the network is directed (T or F)
`bipartite` | whether the network is bipartite (T or F)
`ndyads` | the number of dyads in the network
`nedges` | the number of edges in this network
`tails` | the vector of tail nodes; tail nodes are the 1st column of the implicit edgelist, so either the lower-numbered nodes in an undirected graph, or the out nodes of a directed graph, or the b1 nodes of a bipartite graph
`heads` | the vector of head nodes; head nodes are the 2nd column of the implicit edgelist, so either the higher-numbered nodes in an undirected graph, or the in nodes of a directed graph, or the b2 nodes of a bipartite graph
`nterms` | the number of model terms
`nstats` | the total number of change statistics for all model terms
`inputs` | the concatenated vector of 'input's from each model term as returned by `InitErgmTerm.X` or `InitErgm.X`
`fnamestring` | the concatenated string of model term names
`snamestring` | the concatenated string of package names that contain the C function 'd_fname'; default="ergm" for each fname in fnamestring

`ergm.design` returns a `rlebdm` of informative (non-missing, non fixed) dyads.

### Methods (by class)

- `network`: Collates a `network` object.

- `ergm_model`: Collates an `ergm_model` object.

[Package ergm version 3.10.4 Index]