varDyadCovar | R Documentation |
This function creates a changing dyadic covariate object from an array.
varDyadCovar(val, centered=TRUE, nodeSets=c("Actors", "Actors"),
warn=TRUE, sparse=is.list(val), type=c("oneMode", "bipartite"))
val |
Array of covariate values, third dimension is the
time. Alternatively, a list of sparse matrices of type |
centered |
Boolean: if TRUE, then the overall mean value is subtracted. |
nodeSets |
Names (character string) of the associated node sets. If the entire data set contains more than one node set, then the node sets must be specified in all data objects. |
warn |
Logical: is a warning given if, for non-sparse input,
all values are |
sparse |
Boolean: whether sparse matrices or not. |
type |
oneMode or bipartite: whether the matrix refers to a one-mode or a bipartite (two-mode) network. |
When part of a Siena data object, the covariate is assumed to be
associated with the node sets named NodeSets
of the Siena data object. The names of the associated node sets will only
be checked when the Siena data object is created.
In practice, the node set needs to be specified only in the case of
the use of the covariate with a two-mode network.
The value of the changing covariate for wave m
is supposed
in the simulations to be valid in the whole period from wave m
to wave m+1
.
If the data set has M
waves, this means that the values,
if any, for wave M
will not be used. Therefore, the number of columns
can be M
or M-1
; if the former, the values in the last
column will not be used.
Returns the covariate as an object of class "varDyadCovar", in which
form it can be used as an argument to SienaDataCreate
.
Ruth Ripley
See https://www.stats.ox.ac.uk/~snijders/siena/
sienaDataCreate
, coDyadCovar
,
coCovar
, varCovar
,
sienaNodeSet
mydyadvar <- varDyadCovar(array(c(s501, s502), dim=c(50, 50, 2)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.