
Memberships from community detection algorithms do not always
align numerically. This function seeks to homogenize
community memberships between a target membership (the
membership to homogenize toward) and one or more other
memberships. This function is the core of the
dimensionStability
and
itemStability
functions
community.homogenize(target.membership, convert.membership)
Returns a vector or matrix the length or size of
convert.membership
with memberships homogenized toward
target.membership
Vector, matrix, or data frame.
The target memberships that all other memberships input into
convert.membership
should be homogenize toward
Vector, matrix, or data frame.
Either a vector of memberships the same length as
target.membership
or a matrix or data frame of many
membership solutions with either across rows or down columns the same
length as target.membership
(this function will automatically
determine this orientation for you with precedence given solutions
across rows)
Hudson Golino <hfg9s at virginia.edu> and Alexander P. Christensen <alexpaulchristensen@gmail.com>
Original implementation of bootEGA
Christensen, A. P., & Golino, H. (2021).
Estimating the stability of the number of factors via Bootstrap Exploratory Graph Analysis: A tutorial.
Psych, 3(3), 479-500.
# Get network
network <- network.estimation(wmt2[,7:24])
# Apply Walktrap
network_walktrap <- community.detection(
network, algorithm = "walktrap"
)
# Apply Louvain
network_louvain <- community.detection(
network, algorithm = "louvain"
)
# Homogenize toward Walktrap
community.homogenize(network_walktrap, network_louvain)
Run the code above in your browser using DataLab