weightsMlLoglik {StochBlock}R Documentation

Computes weights for parts of the multilevel network based on random errors using the SS approach with complete blocks only (compatible with k-means)

Description

Computes weights for parts of the multilevel network based on random errors using the SS approach with complete blocks only (compatible with k-means)

Usage

weightsMlLoglik(
  mlNet,
  cluParts,
  k,
  mWeights = 1000,
  sumFun = sd,
  nCores = 0,
  weightClusterSize = 0,
  paramGenPar = list(genPajekPar = FALSE),
  ...
)

Arguments

mlNet

A multilevel/linked network - The code assumes only one relation –> a matrix.

cluParts

A partition spliting the units into different sets

k

A vecotor of number of clusters for each set of units in the network.

mWeights

The number of repetitions for computing random errors. Defaults to 1000

sumFun

The function to compute the summary of errors, which is then used to compute the weights by computing 1/summary. Defaults to sd.

nCores

The number of to use for parallel computing. 0 means all available - 1, 1 means only once core - no parallel computing.

weightClusterSize

The weight given to cluster sizes. Defalults to 0, as only this is weighted my the tie-based weights.

paramGenPar

The parameter addParam from genRandomPar (see documentation there). Default here is paramGenPar=list(genPajekPar = FALSE), which is different from the default in genRandomPar. The same value is used for generating partitions for all partitions.

...

Paramters passed to llStochBlock

Value

Weights and "intermediate results":

errArr

A 3d array of errors (mWeights for each part of the network)

errMatSum

errArr summed over all repetitions.

weightsMat

A matrix of weights, one for each part. An inverse of errMatSum with NaNs replaced by zeros.

Author(s)

Aleš, Žiberna

References

Škulj, D., & Žiberna, A. (2022). Stochastic blockmodeling of linked networks. Social Networks, 70, 240-252.

See Also

llStochBlock; ICLStochBlock


[Package StochBlock version 0.1.2 Index]