View source: R/InitErgmProposal.blockdiag.R
| ergm_block_diag_samp_info | R Documentation |
Given a nodal attribute vector specifying the blocks returns a list containing information needed to efficiently sample dyads in those blocks.
ergm_block_diag_samp_info(nw, a)
nw |
the network of interest. |
a |
either a vector (of any mode) whose |
An object of nonce class ergm_block_diag_samp_info with
the following elements at this time:
nblknumber of blocks
pos (for unipartite), b1pos and b2pos (for
bipartite)vectors of length nblk+1 such that
(pos[i]+1):(pos[i+1]) are the numbers of the vertices in block
i.
cumwtvector of length nblk with values such that
generating U\sim \mathrm{Uniform}(0,1)
selecting the index of the first element in cumwt that is greater
than U will sample from the blocks in proportion to the
number of dyads in the block.
In addition, an attribute "ndyads" is attached, containing the
total number of dyads in all blocks put together.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.