homophili.data {CDatanet}R Documentation

Convert data between directed network models and symmetric network models.

Description

homophili.data is used to convert the matrix of explanatory variables between directed network models and symmetric network models.

Usage

homophili.data(data, nvec, to = c("lower", "upper", "symmetric"))

Arguments

data

is the matrix or data.frame of the explanatory variables of the network formation model. This corresponds to the X matrix in homophily.fe or in homophily.re.

nvec

is a vector of the number of individuals in the networks.

to

indicates the direction of the conversion. For a matrix of explanatory variable X (n*(n-1) rows), one can can select lower triangular entries (to = "lower") or upper triangular entries (⁠to = "upper⁠). For a triangular X (n*(n-1)/2 rows), one can convert to a full matrix of n*(n-1) rows by using symmetry (to = "symmetric").

Value

the transformed data.frame.


[Package CDatanet version 2.1.3 Index]