Package 'dBlockmodeling'

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

Help Index


The notes borrowing network between social-informatics students

Description

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).

Usage

data("notesBorrowing")

Format

The data set is a valued matrix with 13 rows and columns.

References

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

Examples

data(notesBorrowing)

# Plot the network.
# (The function plotMat is from blockmodeling package.)
# plotMat(notesBorrowing)

The New York Times advertisement data

Description

The data pertain to the Turning Point Project (TPP), where n=108n = 108 organizations signed one or more of m=25m = 25 environmental activist-oriented, full-page advertisements in the New York Times (NYT) during 1999-2000.

Usage

data("nyt")

Format

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 ii signed advertisement jj and 0 otherwise.

References

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.

Examples

data(nyt)

# Plot the network.
# (The function plotMat is from blockmodeling package.)
# plotMat(nyt)

One-Mode K-Means Heuristic

Description

This functions runs one-mode K-means for an ROxRORO x RO network matrix.

Usage

omkm(A, RC, TLIMIT, IDIAG = 0)

omkmNrep(A, RC, REP, IDIAG = 0)

Arguments

A

An ROxRORO x RO one-mode network matrix.

RC

The number of clusters for row objects (1<RC<RO1 < RC < RO).

TLIMIT

A desired time limit.- for function omkm only.

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 omkmNrep only.

Value

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 RORO-dimensional vector of row cluser assignements;

  • restarts - the number of restarts within the time limit.

Author(s)

Michael Brusco

References

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

Examples

# 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

Relocation Heuristic for Generalized Structural Balance

Description

This function runs relocation heuristic for generalized structural balance on an NxNN x N asymmetric matrix. The main diagonal is ignored.

Usage

rhgsbt(A, C, TLIMIT)

Arguments

A

An NxNN x N signed network matrix.

C

The number of clusters (1<C<N1 < C < N, where NN is the number of nodes).

TLIMIT

A desired time limit.

Value

The function returns the following:

  • obj - the Doreian & Mrvar objective value;

  • P - NN-dimensional vector of cluser assignements; and

  • restarts - the number of restarts within the time limit.

Author(s)

Michael Brusco

References

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

Examples

# 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

Relocation Heuristic for Relaxed Structural Balance

Description

This function runs relocation heuristic for relaxed structural balance on an MxMM x M asymmetric matrix. The main diagonal is ignored.

Usage

rhrsbt(A, C, TLIMIT)

Arguments

A

An NxNN x N signed network matrix.

C

The number of clusters (1<C<N1 < C < N, where NN is the number of nodes).

TLIMIT

A desired time limit.

Value

The function returns the following:

  • obj - the Doreian & Mrvar objective value;

  • P - NN-dimensional vector of cluser assignements; and

  • restarts - the number of restarts within the time limit.

Author(s)

Michael Brusco

References

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

Examples

# 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's monastery data (time period 3)

Description

Sampson (1968) collected network data among n=18n = 18 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).

Usage

data("sampsonT3")

Format

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 +3+3, the edge to the second-most-liked alter is assigned with a weight of +2+2, and the edge to the third-most-liked alter is assigned with +1+1. Likewise, the edge from a given ego to the most-disliked alter is assigned with an edge weight of 3-3, the edge to the second-most-disliked alter is assigned with a weight of 2-2, and the edge to the third-most-liked alter with a value of 1-1.

References

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.

Examples

data(sampsonT3)

# Plot the network.
# (The function plotMat is from blockmodeling package.)
# plotMat(sampsonT3)

Two-Mode KL-Means Heuristic

Description

This function runs two-mode K-means for an ROxCORO x CO network matrix.

Usage

tmklm(A, RC, CC, TLIMIT)

Arguments

A

An ROxCORO x CO two-mode network matrix.

RC

The number of clusters for row objects (1<RC<RO1 < RC < RO).

CC

The number of clusters for column objects (1<CC<CO1 < CC < CO).

TLIMIT

A desired time limit.

Value

The function returns the following:

  • vaf - the variance-accounted-for;

  • RP - an RORO-dimensional vector of row cluser assignements;

  • RC - an RCRC-dimensional vector of column cluser assignements;

  • restarts - the number of restarts within the time limit.

Author(s)

Michael Brusco

References

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

Examples

# 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

Two-Mode Blockmodeling (Structural Equivalence) Heuristic

Description

This function runs two-mode KL-medians for an ROxCORO x CO two-mode binary network matrix.

Usage

tmklmed(A, RC, CC, TLIMIT)

Arguments

A

An ROxCORO x CO two-mode binary network matrix.

RC

The number of clusters for row objects (1<RC<RO1 < RC < RO).

CC

The number of clusters for column objects (1<CC<CO1 < CC < CO).

TLIMIT

A desired time limit.

Value

The function returns the following:

  • objval - total number of inconsistencies;

  • RP - an RORO-dimensional vector of row cluser assignements;

  • RC - an RCRC-dimensional vector of column cluser assignements;

  • restarts - the number of restarts within the time limit.

Author(s)

Michael Brusco

References

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

Examples

# 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