check.ErgmTerm {ergm}R Documentation

Ensures an Ergm Term and its Arguments Meet Appropriate Conditions

Description

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:

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:

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)

Usage

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="")                  

Arguments

nw

the network that term X is being checked against

arglist

the list of arguments for term X

directed,

logical, whether term X requires a directed network; default=NULL

bipartite

whether term X requires a bipartite network (T or F); default=NULL

nonnegative

whether term X requires a network with only nonnegative weights; default=FALSE

varnames

the vector of names of the possible arguments for term X; default=NULL

vartypes

the vector of types of the possible arguments for term X; default=NULL

defaultvalues

the list of default values for the possible arguments of term X; default=list()

required

the logical vector of whether each possible argument is required; default=NULL

response

edge attribute name?

fname

the name of the model term as a character string

nw.directedflag

logical,whether the network is directed

requirement

logical, whether the term requires a directed network

extramessage

additional messages to attach to the warning; default value = ""

Value

a list of the values for each possible argument of term X; user provided values are used when given, default values otherwise.


[Package ergm version 3.4.0 Index]