critFunCMC: Calculate the value of a criterion function

Description Usage Arguments Value Author(s) See Also Examples

View source: R/critFunCMC.R

Description

This is a modification of the function critFunCMC from package blockmodeling. It calculate the value of a criterion function by considering the ideal block types.

Usage

1
critFunCMC(res, compIM)

Arguments

res

an object returned by a function oprRandParC from blockmodeling package

compIM

an ideal blockmodel with possible blocks of type any

Value

It return a single value.

Author(s)

Marjan Cugmas

See Also

minIncBlocks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
critFunCMC <- function(res, compIM){
  ERR <- critFunC(M = res$M,
                  approaches = res$initial.param$dots$approach,
                  clu = clu(res),
                  blocks = res$initial.param$dots$blocks,
                  blockTypeWeights = res$initial.param$dots$blockTypeWeights)

  im.ord <- minIncBlocks(res = res, compIM = compIM)$order
  return(sum(ERR$EM[,im.ord,im.ord] * ifelse(compIM=="any", yes = 0, no = 1)))
}

nem documentation built on April 23, 2021, 3 p.m.

Related to critFunCMC in nem...