simcausal
network IDs matrix (NetInd_k
).sparseAdjMat.to.NetInd(sparseAdjMat, trimKmax)
dgCMatrix
from package Matrix
).
NOTE: The friends (row numbers) of observation i
are assumed to be listed in column i
(i.e, which(s
sparseAdjMat
will be trimmed, so that each observation has at most trimKmax
friends.
The trimmNetInd_k
; 2) nF
; and 3) Kmax
.
1) NetInd_k
- matrix of network IDs of dimension (n=nrow(sparseAdjMat),Kmax)
, where each row i
consists of the network IDs (friends) for observation i
.
Remainders are filled with NAs.
2) nF
- integer vector of length n
specifying the number of friends for each observation.
3) Kmax
- integer constant specifying the maximum observed number of friends in input sparseAdjMat
(this is the column dimension for the output matrix NetInd_k
).network
; NetInd.to.sparseAdjMat
; sparseAdjMat.to.igraph
; igraph.to.sparseAdjMat
;