SmallGroupNetwork | R Documentation |
Fit configurations to a small group network to determine the best-fitting configuration(s).
Configurations are network structures of theoretical interest. They are fitted
to an empirical small group network to see which configuration
within a configuration_set
best approximates the group network. The
function fit_configuration_set
determines the best-fitting
configuration. Configurations and group networks are represented as square
adjacency matrices. They can be binary or weighted, directed or undirected, and
can include or exclude loops (i.e., self-references). A configuration must have
the same dimensions as a group network to be fitted to it.
When fitting binary configurations, a group network's negative values indicate the absence of an edge (i.e., tie) and positive values indicate the presence of an edge. More negative (or positive) values in the group network give stronger evidence of the absence (or presence) of a tie. The function will attempt to match a configuration's 0-valued elements to negative network values and match a configuration's 1-valued elements to positive values.
Given a binary configuration \mjeqnff in set \mjeqnFF and
network \mjeqnx_gx_g for group \mjeqngg, a score for group
\mjeqngg and configuration \mjeqnff is calculated as:
\mjdeqnscore_g,f = \sum_i=1^N_g \sum_j=1^N_g x_g,ij \cdot b_ij,
score_g,f = \sum_i \sum_j x_g,ij x b_ij, where \mjeqnx_g,ij
x_g,ij is the (i, j)th element in \mjeqnx_gx_g and
\mjeqnb_ij = +1b_ij = +1 when \mjeqnf_ij = 1f_ij = 1,
\mjeqnb_ij = -1b_ij = -1 when \mjeqnf_ij = 0f_ij = 0,
and \mjeqnb_ij = 0b_ij = 0 when \mjeqnf_ijf_ij is
NA
. The order of rows and columns in any configuration \mjeqnff
is arbitrary. Thus, the function determines the ordering of rows and columns in
\mjeqnff that maximizes \mjeqnscore_g,fscore_g,f.
All binary configurations in set \mjeqnFF that have the same
dimensions (\mjeqnN_g \times N_gN_g x N_g) as \mjeqnx_gx_g
are fit using fit_group_network
, which returns the the best-fitting
configuration \mjeqnf^\astf*. The fit
matrix in the returned
configuration_fit
object gives the reordered rows and columns of
configuration \mjeqnf^\astf* that maximizes the score.
When fitting weighted configurations, a group network's values indicate a level of the measured relationship. A configurations n-valued elements are matched to a network's edges with the closest values to n.
Given a weighted configuration \mjeqnff in set \mjeqnFF and
network \mjeqnx_gx_g, a score for group \mjeqngg and
configuration \mjeqnff is calculated as:
\mjdeqnscore_g,f = \sum_i=1^N_g \sum_j=1^N_g \mathrmabs(x_g,ij -
f_ij) \cdot d_ij,score_g,f = \sum_i \sum_j abs(x_g,ij - b_g,ij)
x d_ij, where \mjeqn\mathrmabsabs is the absolute value function
and \mjeqnd_ij = 0d_ij = 0 when \mjeqnf_ijf_ij is
NA
; otherwise, \mjeqnd_ij = 1d_ij = 1. All weighted
configurations in set \mjeqnFF that have the same dimensions
(\mjeqnN_g \times N_gN_g x N_g) as \mjeqnx_gx_g are
fit, and the function returns the reordered weighted configuration
\mjeqnf^\astf* that minimizes the score.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.