simcausal
network ID matrix (NetInd_k
) into a network represented by a sparse adjacency matrix.NetInd.to.sparseAdjMat(NetInd_k, nF)
(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.n
specifying the number of friends for each observation.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
).network
; sparseAdjMat.to.igraph
; igraph.to.sparseAdjMat
; sparseAdjMat.to.NetInd
;