permutParam function

Permute block labels of a stochastic block model parameter

Permute block labels of a stochastic block model parameter

permutParam(theta, permut)

Arguments

  • theta: a SBM parameter with say K blocks
  • permut: a permutation of the block labels 1,2,...,K

Returns

stochastic block model parameter with permuted block labels

Examples

theta1 <- list(pi=c(.5,.5), gamma=matrix((1:4)/8,2,2)) theta2 <- list(pi=c(.5,.5), gamma=matrix(4:1/8,2,2)) permutParam(theta1, 2:1) permutParam(theta2, 2:1)
  • Maintainer: Tabea Rebafka
  • License: GPL-2
  • Last published: 2023-06-07

Useful links