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"))
Returns the covariate as an object of class "varDyadCovar", in which
form it can be used as an argument to SienaDataCreate
.
Array of covariate values, third dimension is the
time. Alternatively, a list of sparse matrices of type "TsparseMatrix"
.
Boolean: if TRUE, then the overall mean value is subtracted.
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.
Logical: is a warning given if, for non-sparse input,
all values are NA
, or all non-missing values are the same.
Boolean: whether sparse matrices or not.
oneMode or bipartite: whether the matrix refers to a one-mode or a bipartite (two-mode) network.
Ruth Ripley
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.
sienaDataCreate
, coDyadCovar
,
coCovar
, varCovar
,
sienaNodeSet
mydyadvar <- varDyadCovar(array(c(s501, s502), dim=c(50, 50, 2)))
Run the code above in your browser using DataLab