sampler.conj {SBMSplitMerge}R Documentation

Conjugate model sampler

Description

Conjugate model sampler

Usage

sampler.conj(currsbm, edges, sbmmod, sigma = NULL, ...)

Arguments

currsbm

the current state of the sampler

edges

an edges object

sbmmod

an sbmmod model

sigma

unused

...

additional arguments for sbmmod$marglike

Value

next state of currsbm object

Note

If using the CRP as the block model, then this is the IRM sampler of Schmidt or Morup (Schmidt, M.N. and Morup, M., 2013. Nonparametric Bayesian modeling of complex networks: An introduction. IEEE Signal Processing Magazine, 30(3), pp.110-128.)

Examples

model <- sbmmod(crp(3), param_beta(1,1,1,1), edges_bern(), marglike=marglike_bern)
trueSBM <- model$r(100)
Edges <- redges(trueSBM, model$edge)
out <- sampler(Edges, model, 10, "conjugate")

[Package SBMSplitMerge version 1.1.1 Index]