This function creates a constant dyadic covariate object from a matrix.
coDyadCovar(val, centered=TRUE, nodeSets=c("Actors", "Actors"),
warn=TRUE, sparse=inherits(val,"TsparseMatrix"), type=c("oneMode", "bipartite"))
Returns the covariate as an object of class "coDyadCovar", in which
form it can be used as an argument to sienaDataCreate
.
Matrix of covariate values. May be sparse, of type
"TsparseMatrix"
.
Boolean: if TRUE, then the mean value is subtracted.
The name of the node sets with which this covariate is associated. 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 all values are NA
,
or all non-missing values are the same.
Boolean: whether a sparse matrix 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 in nodeSets of the Siena data object. The name of the associated node sets will only be checked when the Siena data object is created.
sienaDataCreate
, varDyadCovar
,
coCovar
, varCovar
mydyadvar <- coDyadCovar(s503)
Run the code above in your browser using DataLab