varCovar {RSiena}R Documentation

Function to create a changing covariate object.

Description

This function creates a changing covariate object from a matrix.

Usage

varCovar(val, centered=TRUE, nodeSet="Actors", imputationValues=NULL)

Arguments

val

Matrix of covariate values, one row for each actor, one column for each period.

centered

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

nodeSet

Character string containing the name of the associated node set. If the entire data set contains more than one node set, then the node sets must be specified in all data objects.

imputationValues

Mtrix of covariate values of same dimensions as val, to be used for imputation of NA values (if any) in val. Must not contain any NA.

Details

When part of a Siena data object, the covariate is assumed to be associated with node set nodeSet of the Siena data object.
If there are any NA values in val, and imputationValues is given, then the corresponding elements of imputationValues are used for imputation. If imputationValues is NULL, imputation is by the overall mean value. In both cases, cases with imputed values are not used for calculating target statistics (see the manual).

Value

Returns the covariate as an object of class "varCovar", 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, coCovar, coDyadCovar, varDyadCovar

Examples


myvarCovar <- varCovar(s50a)


[Package RSiena version 1.2-17 Index]