coDyadCovar: Function to create a constant dyadic covariate object.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/sienautils.r

Description

This function creates a constant dyadic covariate object from a matrix.

Usage

1
2
coDyadCovar(val, centered=TRUE, nodeSets=c("Actors", "Actors"),
    sparse=is(val,"dgTMatrix"), type=c("oneMode", "bipartite"))

Arguments

val

Matrix of covariate values. May be sparse, of type "dgTMatrix".

centered

Boolean: if TRUE, then the mean value is subtracted.

nodeSets

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.

sparse

Boolean: whether a sparse matrix or not.

type

oneMode or bipartite: whether the matrix refers to a one-mode or a bipartite (two-mode) network.

Details

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.

Value

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

Author(s)

Ruth Ripley

References

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

See Also

sienaDataCreate, varDyadCovar, coCovar, varCovar

Examples

1
mydyadvar <- coDyadCovar(s503)

RSiena documentation built on Sept. 24, 2020, 3 p.m.