Convert simcausal
network ID matrix (NetInd_k
) into a network represented by a sparse adjacency matrix.
NetInd.to.sparseAdjMat(NetInd_k, nF)
Network represented as a sparse adjacency matrix (S4 class object dgCMatrix
from package Matrix
).
NOTE: The friend IDs for observation i
will be listed in column i
(i.e, which(sparseAdjMat[,i])
are friends of i
).
Matrix of network IDs of dimension (n=nrow(sparseAdjMat),Kmax)
,
where each row i
consists of the network IDs (row number of friends) of observation i
. Remainders are filled with NA
s.
Integer vector of length n
specifying the number of friends for each observation.
network
; sparseAdjMat.to.igraph
; igraph.to.sparseAdjMat
; sparseAdjMat.to.NetInd
;