BlockMatrix: Block matrix

View source: R/block_structure.R

BlockMatrixR Documentation

Block matrix

Description

Generates a symmetric block matrix of size (sum(pk) x sum(pk)). The sizes of the submatrices is defined based on pk. For each submatrix, all entries are equal to the submatrix (block) index.

Usage

BlockMatrix(pk)

Arguments

pk

vector encoding the grouping structure.

Value

A symmetric block matrix.

See Also

Other block matrix functions: BlockDiagonal(), BlockStructure()

Examples

# Example 1
BlockMatrix(pk = c(2, 3))

# Example 2
BlockMatrix(pk = c(2, 3, 2))

fake documentation built on April 14, 2023, 12:37 a.m.