Title: | Deterministic Blockmodeling of Signed, One-Mode and Two-Mode Networks |
---|---|
Description: | It contains functions to apply blockmodeling of signed (positive and negative weights are assigned to the links), one-mode and valued one-mode and two-mode (two sets of nodes are considered, e.g. employees and organizations) networks (Brusco et al. (2019) <doi:10.1111/bmsp.12192>). |
Authors: | Michael Brusco [aut], Aleš Žiberna [cre], Marjan Cugmas [ctb], Patrick Doreian [ctb], Doug Steinley [ctb] |
Maintainer: | Aleš Žiberna <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2.3 |
Built: | 2024-11-15 06:30:20 UTC |
Source: | CRAN |
The data come from a survey conducted in May 1993 on 13 social-informatics students (Hlebec, 1996). The network was constructed from answers to the question, “How often did you borrow notes from this person?” for each of the fellow students. The respondents indicated the frequency of borrowing by choosing (on a computer) a line of length 1–20, where 1 meant no borrowing. 1 was deducted from all answers, so that 0 now means no borrowing. The data was first used for blockmodeling in Žiberna (2007).
data("notesBorrowing")
data("notesBorrowing")
The data set is a valued matrix with 13 rows and columns.
Hlebec, V., (1996). Metodološke značilnosti anketnega zbiranja podatkov v analizi omrežji: Magistersko delo. FDV, Ljubljana.
Žiberna, A. (2007). Generalized blockmodeling of valued networks. Social Networks, 29, 105–126. https://doi.org/10.1016/j.socnet.2006.04.002
data(notesBorrowing) # Plot the network. # (The function plotMat is from blockmodeling package.) # plotMat(notesBorrowing)
data(notesBorrowing) # Plot the network. # (The function plotMat is from blockmodeling package.) # plotMat(notesBorrowing)
The data pertain to the Turning Point Project (TPP), where organizations signed one or more of
environmental activist-oriented, full-page advertisements in the New York Times (NYT) during 1999-2000.
data("nyt")
data("nyt")
The data set is a binary network matrix with 108 rows (organizations) and 25 columns (full-page advertisements). An element of the binary network matrix assumes a value of 1 if organization signed advertisement
and 0 otherwise.
Brusco, M., Doreian, P., Steinley, D., & Satornino, C. B. (2013). Multiobjective blockmodeling for social network analysis. Psychometrika, 78 (3), 498-525
Brusco, M., & Doreian, P. (2015). A real-coded genetic algorithm for two-mode KL-means partitioning with application to homogeneity blockmodeling. Social Networks, 41, 26-35.
data(nyt) # Plot the network. # (The function plotMat is from blockmodeling package.) # plotMat(nyt)
data(nyt) # Plot the network. # (The function plotMat is from blockmodeling package.) # plotMat(nyt)
This functions runs one-mode K-means for an network matrix.
omkm(A, RC, TLIMIT, IDIAG = 0) omkmNrep(A, RC, REP, IDIAG = 0)
omkm(A, RC, TLIMIT, IDIAG = 0) omkmNrep(A, RC, REP, IDIAG = 0)
A |
An |
RC |
The number of clusters for row objects ( |
TLIMIT |
A desired time limit.- for function |
IDIAG |
0 if main diagonal to be ignored, any other value it will be included. Default is 0. |
REP |
The number of repetitions - for function |
The function returns the following:
sse
- the sum of the within-block sum-of-squared deviations from the block means;
vaf
- the variance-accounted-for;
RP
- an -dimensional vector of row cluser assignements;
restarts
- the number of restarts within the time limit.
Michael Brusco
Brusco, M. J., Doreian, P., & Steinley, D. (2019). Deterministic blockmodeling of signed and two-mode networks: a tutorial with psychological examples. British Journal of Mathematical and Statistical Psychology.
Baier, D., Gaul, W., & Schader, M. (1997). Two-mode overlapping clustering with applications in simultaneous benefit segmentation and market structuring. In R. Klar & O. Opitz (Eds), Classification and knowledge organization (pp. 557-566), Heidelberg: Springer.
Brusco, M., & Doreian, P. (2015). A real-coded genetic algorithm for two-mode KL-means partitioning with application to homogeneity blockmodeling. Social Networks, 41, 26-35. http://dx.doi.org/10.1016/j.socnet.2014.11.007 Žiberna, A. (2020). K-means-based algorithm for blockmodeling linked networks. Social Networks, 61, 153–169. https://doi.org/10.1016/j.socnet.2019.10.006
# Load the notes borrowing data.. data("notesBorrowing") #Run one-mode K-means procedure. res <- omkm(notesBorrowing,RC = 3, TLIMIT = 1, IDIAG = 0) # See the results. res
# Load the notes borrowing data.. data("notesBorrowing") #Run one-mode K-means procedure. res <- omkm(notesBorrowing,RC = 3, TLIMIT = 1, IDIAG = 0) # See the results. res
This function runs relocation heuristic for generalized structural balance on an asymmetric matrix. The main diagonal is ignored.
rhgsbt(A, C, TLIMIT)
rhgsbt(A, C, TLIMIT)
A |
An |
C |
The number of clusters ( |
TLIMIT |
A desired time limit. |
The function returns the following:
obj
- the Doreian & Mrvar objective value;
P
- -dimensional vector of cluser assignements; and
restarts
- the number of restarts within the time limit.
Michael Brusco
Brusco, M. J., Doreian, P., & Steinley, D. (2019). Deterministic blockmodeling of signed and two-mode networks: a tutorial with psychological examples. British Journal of Mathematical and Statistical Psychology.
Doreian, P., & Mrvar, A. (1996). A partitioning approach to structural balance. Social Networks, 18, 149-168. https://doi.org/10.1016/0378-8733(95)00259-6
Brusco, M. J., & Doreian, P. (2019). Partitioning signed networks using relocation heuristics, tabu search, and variable neighborhood search. Social Networks, 56, 70-80. https://doi.org/10.1016/j.socnet.2018.08.007
# Load the Sampson (1968) monastery network (3rd time point). data("sampsonT3") # Run relocation heuristic for generalized structural balance. res <- rhgsbt(A = sampsonT3, C = 3, TLIMIT = 1) # See the results. res
# Load the Sampson (1968) monastery network (3rd time point). data("sampsonT3") # Run relocation heuristic for generalized structural balance. res <- rhgsbt(A = sampsonT3, C = 3, TLIMIT = 1) # See the results. res
This function runs relocation heuristic for relaxed structural balance on an asymmetric matrix. The main diagonal is ignored.
rhrsbt(A, C, TLIMIT)
rhrsbt(A, C, TLIMIT)
A |
An |
C |
The number of clusters ( |
TLIMIT |
A desired time limit. |
The function returns the following:
obj
- the Doreian & Mrvar objective value;
P
- -dimensional vector of cluser assignements; and
restarts
- the number of restarts within the time limit.
Michael Brusco
Brusco, M. J., Doreian, P., & Steinley, D. (2019). Deterministic blockmodeling of signed and two-mode networks: a tutorial with psychological examples. British Journal of Mathematical and Statistical Psychology.
Doreian, P., & Mrvar, A. (2009). Partitioning signed social networks. Social Networks, 31, 1-11. http://dx.doi.org/10.1016/j.socnet.2008.08.001
# Load the Sampson (1968) monastery network (3rd time point). data("sampsonT3") # Run relocation heuristic for relaxed structural balance. res <- rhrsbt(A = sampsonT3, C = 3, TLIMIT = 1) # See the results. res
# Load the Sampson (1968) monastery network (3rd time point). data("sampsonT3") # Run relocation heuristic for relaxed structural balance. res <- rhrsbt(A = sampsonT3, C = 3, TLIMIT = 1) # See the results. res
Sampson (1968) collected network data among trainee monks at multiple time periods. Network ties were collected with respect to several different relations including affect, esteem, influence, and sanction.
With respect to affect, Sampson (1968) asked each of the 18 trainees (egos) to identify and rank the three other members (alters) of the cohort they liked the most, as well the three members they liked the least.
The data sampsonT3
refers to affect network data, collected at the third time point (Doreian et al., 2005, p. 33).
data("sampsonT3")
data("sampsonT3")
The data set is a 18 x 18 (signed weighted) network matrix. The egos are in lines and the alters are in columns. The entries are egos' answers. The elements of the network matrix are discrete values between -3 and 3.
The edge from a given ego to the most-liked alter (by this ego) is assigned with an edge weight of , the edge to the second-most-liked alter is assigned with a weight of
, and the edge to the third-most-liked alter is assigned with
. Likewise, the edge from a given ego to the most-disliked alter is assigned with an edge weight of
, the edge to the second-most-disliked alter is assigned with a weight of
, and the edge to the third-most-liked alter with a value of
.
Sampson, S. F. (1968). A novitiate in a period of change: An experimental case study of relationships. Unpublished Ph.D. dissertation, Department of Sociology, Cornell University, Ithaca, NY.
Doreian, P., Batagelj, V., & Ferligoj, A. (2005). Generalized blockmodeling, Cambridge, UK: Cambridge University Press.
data(sampsonT3) # Plot the network. # (The function plotMat is from blockmodeling package.) # plotMat(sampsonT3)
data(sampsonT3) # Plot the network. # (The function plotMat is from blockmodeling package.) # plotMat(sampsonT3)
This function runs two-mode K-means for an network matrix.
tmklm(A, RC, CC, TLIMIT)
tmklm(A, RC, CC, TLIMIT)
A |
An |
RC |
The number of clusters for row objects ( |
CC |
The number of clusters for column objects ( |
TLIMIT |
A desired time limit. |
The function returns the following:
vaf
- the variance-accounted-for;
RP
- an -dimensional vector of row cluser assignements;
RC
- an -dimensional vector of column cluser assignements;
restarts
- the number of restarts within the time limit.
Michael Brusco
Brusco, M. J., Doreian, P., & Steinley, D. (2019). Deterministic blockmodeling of signed and two-mode networks: a tutorial with psychological examples. British Journal of Mathematical and Statistical Psychology.
Baier, D., Gaul, W., & Schader, M. (1997). Two-mode overlapping clustering with applications in simultaneous benefit segmentation and market structuring. In R. Klar & O. Opitz (Eds), Classification and knowledge organization (pp. 557-566), Heidelberg: Springer.
Brusco, M., & Doreian, P. (2015). A real-coded genetic algorithm for two-mode KL-means partitioning with application to homogeneity blockmodeling. Social Networks, 41, 26-35. http://dx.doi.org/10.1016/j.socnet.2014.11.007
# Load the Turning Point Project network (Brusco & Doreian, 2015) data. data("nyt") # Run two-mode K-means procedure. res <- tmklm(nyt,RC = 9,CC = 5,TLIMIT = 1) # See the results. res
# Load the Turning Point Project network (Brusco & Doreian, 2015) data. data("nyt") # Run two-mode K-means procedure. res <- tmklm(nyt,RC = 9,CC = 5,TLIMIT = 1) # See the results. res
This function runs two-mode KL-medians for an two-mode binary network matrix.
tmklmed(A, RC, CC, TLIMIT)
tmklmed(A, RC, CC, TLIMIT)
A |
An |
RC |
The number of clusters for row objects ( |
CC |
The number of clusters for column objects ( |
TLIMIT |
A desired time limit. |
The function returns the following:
objval
- total number of inconsistencies;
RP
- an -dimensional vector of row cluser assignements;
RC
- an -dimensional vector of column cluser assignements;
restarts
- the number of restarts within the time limit.
Michael Brusco
Brusco, M. J., Doreian, P., & Steinley, D. (2019). Deterministic blockmodeling of signed and two-mode networks: a tutorial with psychological examples. British Journal of Mathematical and Statistical Psychology.
Doreian, P., Batagelj, V., & Ferligoj, A. (2004). Generalized blockmodeling of two-mode network data. Social Networks, 26, 29-53. doi:10.1016/j.socnet.2004.01.002
Brusco, M., Stolze, H. J., Hoffman, M., Steinley, D., & Doreian, P. (2018). Deterministic blockmodeling of two-mode binary network data using two-mode KL-median partitioning. Journal of Social Structure, 19, 1-21. Retrieved from: https://www.exeley.com/exeley/journals/journal_of_social_structure/19/1/pdf/10.21307_joss-2018-007.pdf
# Load the Turning Point Project network (Brusco & Doreian, 2015) data. data("nyt") # Run the two-mode blockmodeling heuristic procedure. res <- tmklmed(nyt, RC = 9, CC = 5, TLIMIT = 1) # See the results. res
# Load the Turning Point Project network (Brusco & Doreian, 2015) data. data("nyt") # Run the two-mode blockmodeling heuristic procedure. res <- tmklmed(nyt, RC = 9, CC = 5, TLIMIT = 1) # See the results. res