Learn R Programming

RSiena (version 1.4.7)

varDyadCovar: Function to create a changing dyadic covariate object.

Description

This function creates a changing dyadic covariate object from an array.

Usage

varDyadCovar(val, centered=TRUE, nodeSets=c("Actors", "Actors"),
     warn=TRUE, sparse=is.list(val), type=c("oneMode", "bipartite"))

Value

Returns the covariate as an object of class "varDyadCovar", in which form it can be used as an argument to SienaDataCreate.

Arguments

val

Array of covariate values, third dimension is the time. Alternatively, a list of sparse matrices of type "TsparseMatrix".

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 NA, or all non-missing values are the same.

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.

Author

Ruth Ripley

Details

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.

References

See https://www.stats.ox.ac.uk/~snijders/siena/

See Also

sienaDataCreate, coDyadCovar, coCovar, varCovar, sienaNodeSet

Examples

Run this code

mydyadvar <- varDyadCovar(array(c(s501, s502), dim=c(50, 50, 2)))

Run the code above in your browser using DataLab