Learn R Programming

SBMSplitMerge (version 1.1.1)

sampler.gibbs: Gibbs sampling for node assignments

Description

Gibbs sampling for node assignments

Usage

sampler.gibbs(currsbm, edges, sbmmod, sigma)

Arguments

currsbm

the current state of the sampler

edges

an edges object

sbmmod

an sbmmod model

sigma

random walk parameter for theta

Value

next state of currsbm object

Examples

Run this code
# NOT RUN {
model <- sbmmod(multinom(1, 3), param_gamma(1,1,1,1), edges_pois())
trueSBM <- model$r(10)
Edges <- redges(trueSBM, model$edge)
gibbs_out <- sampler(Edges, model, algorithm="gibbs", 10, sigma=0.1)
eval_plots(gibbs_out)
# }

Run the code above in your browser using DataLab