An S4 class to represent a Stochastic Block Model.
Such model can be used to cluster graph vertex, and model a square adjacency matrix \(X\) with the following generative model :
$$ \pi \sim Dirichlet(\alpha)$$
$$ Z_i \sim \mathcal{M}(1,\pi)$$
$$ \theta_{kl} \sim Beta(a_0,b_0)$$
$$ X_{ij}|Z_{ik}Z_{jl}=1 \sim \mathcal{B}(\theta_{kl})$$
These classes mainly store the prior parameters value \(\alpha,a_0,b_0\) of this generative model.
The Sbm-class
must be used when fitting a simple Sbm whereas the SbmPrior-class
must be used when fitting a CombinedModels-class
.
SbmPrior(a0 = 1, b0 = 1, type = "guess")
Sbm(alpha = 1, a0 = 1, b0 = 1, type = "guess")
Beta prior parameter over links (default to 1)
Beta prior parameter over no-links (default to 1)
define the type of networks (either "directed", "undirected" or "guess", default to "guess"), for undirected graphs the adjacency matrix is supposed to be symmetric.
Dirichlet prior parameter over the cluster proportions (default to 1)
a SbmPrior-class
object
a Sbm-class
object
Nowicki, Krzysztof and Tom A B Snijders (2001). “Estimation and prediction for stochastic block structures”. In:Journal of the American statistical association 96.455, pp. 1077–1087
Sbm()
#> An object of class "Sbm"
#> Slot "alpha":
#> [1] 1
#>
#> Slot "a0":
#> [1] 1
#>
#> Slot "b0":
#> [1] 1
#>
#> Slot "type":
#> [1] "guess"
#>
SbmPrior()
#> An object of class "SbmPrior"
#> Slot "a0":
#> [1] 1
#>
#> Slot "b0":
#> [1] 1
#>
#> Slot "type":
#> [1] "guess"
#>
SbmPrior(type = "undirected")
#> An object of class "SbmPrior"
#> Slot "a0":
#> [1] 1
#>
#> Slot "b0":
#> [1] 1
#>
#> Slot "type":
#> [1] "undirected"
#>
Sbm()
#> An object of class "Sbm"
#> Slot "alpha":
#> [1] 1
#>
#> Slot "a0":
#> [1] 1
#>
#> Slot "b0":
#> [1] 1
#>
#> Slot "type":
#> [1] "guess"
#>
Sbm(type = "undirected")
#> An object of class "Sbm"
#> Slot "alpha":
#> [1] 1
#>
#> Slot "a0":
#> [1] 1
#>
#> Slot "b0":
#> [1] 1
#>
#> Slot "type":
#> [1] "undirected"
#>