Computes variance of at ego level
ego_variance(graph, Y, funname, all = FALSE)
graph
: A matrix of size of class dgCMatrix
.Y
: A numeric vector of length .funname
: Character scalar. Comparison to make (see vertex_covariate_compare
).all
: Logical scalar. When FALSE
(default) is mean at ego level. Otherwise is fix for all i (see details).A numeric vector of length .
For each vertex the variance is computed as follows
Where is the ij-th element of graph
, is the function specified in funname
, and, if all=FALSE
, otherwise
This is an auxiliary function for struct_test
. The idea is to compute an adjusted measure of disimilarity between vertices, so the closest in terms of is to its neighbors, the smaller the relative variance.
struct_test
Other statistics: bass
, classify_adopters()
, cumulative_adopt_count()
, dgr()
, exposure()
, hazard_rate()
, infection()
, moran()
, struct_equiv()
, threshold()
, vertex_covariate_dist()
Useful links