homophili.data
converts the matrix of explanatory variables between directed network models and symmetric network models.
homophili.data(data, nvec, to = c("lower", "upper", "symmetric"))
The transformed data.frame
.
A matrix
or data.frame
of the explanatory variables of the network formation model. This
corresponds to the X
matrix in homophily.fe
or homophily.re
.
A vector of the number of individuals in the networks.
Indicates the direction of the conversion. For a matrix of explanatory variables X
(n*(n-1)
rows), one 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"
).