| sampler.net.attr.generator | R Documentation |
The 'sampler_net_attr' class is a simple R6 container used within the 'sampler.iglm' class. It holds the MCMC sampling parameters for a single component of the 'iglm' model, such as one attribute (e.g., 'x_attribute') or a part of the network (e.g., 'z_network' within the overlap). It stores the number of proposals and the TNT flag. The random seed is managed centrally by the parent 'sampler.iglm' object.
n_proposals('integer') Read-only. Number of MCMC proposals per step.
tnt('logical') Read-only. Whether TNT sampling is used.
new()Create a new 'sampler_net_attr' object.
sampler.net.attr.generator$new(n_proposals = 10000, file = NULL, tnt = TRUE)
n_proposals(integer) The number of MCMC proposals (iterations) to perform for this specific component during each sampling step. Default is 10000. Must be a non-negative integer.
file(character or 'NULL') If provided, loads the sampler state from the specified .rds file instead of initializing from parameters.
tnt(logical) If 'TRUE' (default), use Tie-No-Tie sampling (only if used for networks).
A new 'sampler_net_attr' object.
print()Print a summary of the sampler settings for this component.
sampler.net.attr.generator$print(indent = " ")
indent(character) Indentation string. Default is " ".
The object itself, invisibly.
gather()Gathers all data into a list.
sampler.net.attr.generator$gather()
A list with 'n_proposals' and 'tnt'.
set_n_proposals()Sets the number of MCMC proposals.
sampler.net.attr.generator$set_n_proposals(n_proposals)
n_proposals(integer) Number of proposals.
set_tnt()Sets whether to use TNT sampling.
sampler.net.attr.generator$set_tnt(tnt)
tnt(logical) 'TRUE' to use TNT sampling.
save()Save state to an .rds file.
sampler.net.attr.generator$save(file)
file(character) File path.
The object itself, invisibly.
clone()The objects of this class are cloneable with this method.
sampler.net.attr.generator$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.