These are low-level functions not intended to be called by end users. For information on ergm terms, see ergm-terms
The check.ErgmTerm
function ensures for the InitErgmTerm.X
function that the term X:
is applicable given the 'directed' and 'bipartite' attributes of the given network
is not applied to a directed bipartite network
has an appropiate number of arguments
has correct argument types if arguments where provided
has default values assigned if defaults are available
by halting execution if any of the first 3 criteria are not met.
The ergm.checkargs
function ensures for the InitErgm
function that the term X:
has an appropiate number of arguments
has correct argument types if arguments where provieded
has default values assigned for non-required arguments
by halting execution if either of the first 2 criteria are not met
The the ergm.checkdirected
function halts execution for the <InitErgm> functions
with an error message if the given model term cannot be used with the network
because of its state as (un)directed. (essentially it prints and formats the the error message)
check.ErgmTerm(nw, arglist, directed = NULL, bipartite = NULL,
nonnegative = FALSE, varnames = NULL, vartypes = NULL,
defaultvalues = list(), required = NULL, response = NULL)
ergm.checkargs(fname, arglist, varnames=NULL, vartypes=NULL,
defaultvalues=list(), required=NULL)
ergm.checkdirected(fname, nw.directedflag, requirement,
extramessage="")
the network that term X is being checked against
the list of arguments for term X
logical, whether term X requires a directed network; default=NULL
whether term X requires a bipartite network (T or F); default=NULL
whether term X requires a network with only nonnegative weights; default=FALSE
the vector of names of the possible arguments for term X; default=NULL
the vector of types of the possible arguments for term X; default=NULL
the list of default values for the possible arguments of term X; default=list()
the logical vector of whether each possible argument is required; default=NULL
edge attribute name?
the name of the model term as a character string
logical,whether the network is directed
logical, whether the term requires a directed network
additional messages to attach to the warning; default value = ""
a list of the values for each possible argument of term X; user provided values are used when given, default values otherwise.