ergm.bridge.llr()
and logLik.ergm()
Auxiliary functions as user interfaces for fine-tuning the
ergm.bridge.llr()
algorithm, which approximates log likelihood
ratios using bridge sampling.
By default, the bridge sampler inherits its control
parameters from the ergm()
fit; control.logLik.ergm()
allows
the user to selectively override them.
control.ergm.bridge(
bridge.nsteps = 16,
bridge.target.se = NULL,
bridge.bidirectional = TRUE,
drop = TRUE,
MCMC.burnin = MCMC.interval * 128,
MCMC.burnin.between = max(ceiling(MCMC.burnin/sqrt(bridge.nsteps)), MCMC.interval * 16),
MCMC.interval = 128,
MCMC.samplesize = 16384,
obs.MCMC.burnin = obs.MCMC.interval * 128,
obs.MCMC.burnin.between = max(ceiling(obs.MCMC.burnin/sqrt(bridge.nsteps)),
obs.MCMC.interval * 16),
obs.MCMC.interval = MCMC.interval,
obs.MCMC.samplesize = MCMC.samplesize,
MCMC.prop = trim_env(~sparse + .triadic),
MCMC.prop.weights = "default",
MCMC.prop.args = list(),
obs.MCMC.prop = MCMC.prop,
obs.MCMC.prop.weights = MCMC.prop.weights,
obs.MCMC.prop.args = MCMC.prop.args,
MCMC.maxedges = Inf,
MCMC.packagenames = c(),
term.options = list(),
seed = NULL,
parallel = 0,
parallel.type = NULL,
parallel.version.check = TRUE,
parallel.inherit.MT = FALSE,
...
)control.logLik.ergm(
bridge.nsteps = 16,
bridge.target.se = NULL,
bridge.bidirectional = TRUE,
drop = NULL,
MCMC.burnin = NULL,
MCMC.interval = NULL,
MCMC.samplesize = NULL,
obs.MCMC.samplesize = MCMC.samplesize,
obs.MCMC.interval = MCMC.interval,
obs.MCMC.burnin = MCMC.burnin,
MCMC.prop = NULL,
MCMC.prop.weights = NULL,
MCMC.prop.args = NULL,
obs.MCMC.prop = MCMC.prop,
obs.MCMC.prop.weights = MCMC.prop.weights,
obs.MCMC.prop.args = MCMC.prop.args,
MCMC.maxedges = Inf,
MCMC.packagenames = NULL,
term.options = NULL,
seed = NULL,
parallel = NULL,
parallel.type = NULL,
parallel.version.check = TRUE,
parallel.inherit.MT = FALSE,
...
)
A list with arguments as components.
Number of geometric bridges to use.
If not NULL
, if the estimated MCMC standard error of the likelihood estimate exceeds this, repeat the bridge sampling, accumulating samples.
Whether the bridge sampler first bridges from from
to to
, then from to
to from
(skipping the first burn-in), etc. if multiple attempts are required.
See control.ergm()
.
Number of proposals before any MCMC sampling is done. It typically is set to a fairly large number.
Number of proposals between the bridges; typically, less and less is needed as the number of steps decreases.
Number of proposals between sampled statistics.
Number of network statistics, randomly drawn from a given distribution on the set of all networks, returned by the Metropolis-Hastings algorithm.
The obs
versions of these arguments are for the unobserved data simulation
algorithm.
Specifies the proposal (directly) and/or
a series of "hints" about the structure of the model being
sampled. The specification is in the form of a one-sided formula
with hints separated by +
operations. If the LHS exists and is
a string, the proposal to be used is selected directly.
A common and default "hint" is ~sparse
, indicating
that the network is sparse and that the sample should put roughly
equal weight on selecting a dyad with or without a tie as a
candidate for toggling.
Specifies the proposal
distribution used in the MCMC Metropolis-Hastings algorithm. Possible
choices depending on selected reference
and constraints
arguments of the ergm()
function, but often include "TNT"
and "random"
, and the "default"
is to use the one with the
highest priority available.
An alternative, direct way of specifying additional arguments to proposal.
The obs
versions of these arguments are for the unobserved data simulation algorithm.
The maximum number of edges that may occur during the MCMC sampling. If this number is exceeded at any time, sampling is stopped immediately.
Names of packages in which to look for change statistic functions in addition to those autodetected. This argument should not be needed outside of very strange setups.
A list of additional arguments to be passed to term initializers. See ? term.options
.
Seed value (integer) for the random number generator. See
set.seed()
.
Number of threads in which to run the sampling. Defaults to 0 (no parallelism). See the entry on parallel processing for details and troubleshooting.
API to use for parallel processing. Supported values
are "MPI"
and "PSOCK"
. Defaults to using the parallel
package with PSOCK clusters. See ergm-parallel
Logical: If TRUE, check that the version of ergm running on the slave nodes is the same as that running on the master node.
Logical: If TRUE, slave nodes and
processes inherit the set.MT_terms()
setting.
A dummy argument to catch deprecated or mistyped control parameters.
control.ergm.bridge()
is only used within a call to the
ergm.bridge.llr()
, ergm.bridge.dindstart.llk()
, or
ergm.bridge.0.llk()
functions.
control.logLik.ergm()
is only used within a call to the
logLik.ergm()
.
ergm.bridge.llr()
logLik.ergm()