ego_variance | R Documentation |
Y
at ego levelComputes variance of Y
at ego level
ego_variance(graph, Y, funname, all = FALSE)
graph |
A matrix of size |
Y |
A numeric vector of length |
funname |
Character scalar. Comparison to make (see |
all |
Logical scalar. When |
For each vertex i
the variance is computed as follows
%
(\sum_j a_{ij})^{-1}\sum_j a_{ij} \left[f(y_i,y_j) - f_i\right]^2
Where a_{ij}
is the ij-th element of graph
, f
is
the function specified in funname
, and, if all=FALSE
f_i = \sum_j a_{ij}f(y_i,y_j)^2/\sum_ja_{ij}
,
otherwise f_i = f_j = \frac{1}{n^2}\sum_{i,j}f(y_i,y_j)
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 f
is i
to its neighbors, the smaller the
relative variance.
A numeric vector of length n
.
struct_test
Other statistics:
bass
,
classify_adopters()
,
cumulative_adopt_count()
,
dgr()
,
exposure()
,
hazard_rate()
,
infection()
,
moran()
,
struct_equiv()
,
threshold()
,
vertex_covariate_dist()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.