dot-update_aff_mat: Update sparse affiliation network with new data

Description Usage Arguments Details Value

Description

Updates a affiliation network stored in sparse format with new data of an ego-centric network

Usage

1
.update_aff_mat(x, y, update_diag = FALSE, normalize = FALSE)

Arguments

x

the affiliation network to be updated; must be a sparseMatrix of the Matrix package

y

an integer vector containing the indices of groups to be updated

update_diag

boolean; if true updates the diagonal elements

normalize

boolean; if true contribution of each ego to the elements in the affiliation are weighted by the inverse of ties ego holds

Details

Given x, the function takes new data on a set of affiliations connected to the same unit and updates the affiliation accordingly. If y contains the indices 1,6,12, for example, the affiliation network is updated by adding one count to the entries (1, 6), (6, 1), (1, 12), (12, 1), (6, 12), (12, 6).

Value

returns the updated affiliation matrix x.


baruuum/btoolbox documentation built on Aug. 17, 2020, 1:29 a.m.