Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

control.san

Auxiliary for Controlling SAN


Description

Auxiliary function as user interface for fine-tuning simulated annealing algorithm.

Usage

control.san(
  SAN.maxit = 4,
  SAN.tau = 1,
  SAN.invcov = NULL,
  SAN.invcov.diag = FALSE,
  SAN.nsteps.alloc = function(nsim) 2^seq_len(nsim),
  SAN.nsteps = 2^19,
  SAN.samplesize = 2^12,
  SAN.init.maxedges = 20000,
  SAN.max.maxedges = 2^26,
  SAN.prop.weights = "default",
  SAN.prop.args = list(),
  SAN.packagenames = c(),
  SAN.ignore.finite.offsets = TRUE,
  term.options = list(),
  seed = NULL,
  parallel = 0,
  parallel.type = NULL,
  parallel.version.check = TRUE
)

Arguments

SAN.maxit

Number of temperature levels to use.

SAN.tau

Tuning parameter, specifying the temperature of the process during the penultimate iteration. (During the last iteration, the temperature is set to 0, resulting in a greedy search, and during the previous iterations, the temperature is set to SAN.tau*(iterations left after this one).

SAN.invcov

Initial inverse covariance matrix used to calculate Mahalanobis distance in determining how far a proposed MCMC move is from the target.stats vector. If NULL, initially set to the identity matrix, then during subsequent runs estimated empirically.

SAN.invcov.diag

Whether to only use the diagonal of the covariance matrix. It seems to work better in practice.

SAN.nsteps.alloc

Either a numeric vector or a function of the number of runs giving a sequence of relative lengths of simulated annealing runs.

SAN.nsteps

Number of MCMC proposals for all the annealing runs combined.

SAN.samplesize

Number of realisations' statistics to obtain for tuning purposes.

SAN.init.maxedges

Maximum number of edges expected in network.

SAN.max.maxedges

Hard upper bound on the number of edges in the network.

SAN.prop.weights

Specifies the proposal distribution used in the SAN 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.

The TNT (tie / no tie) option puts roughly equal weight on selecting a dyad with or without a tie as a candidate for toggling, whereas the random option puts equal weight on all possible dyads, though the interpretation of random may change according to the constraints in place. When no constraints are in place, the default is TNT, which appears to improve Markov chain mixing particularly for networks with a low edge density, as is typical of many realistic social networks.

SAN.prop.args

An alternative, direct way of specifying additional arguments to proposal.

SAN.packagenames

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.

SAN.ignore.finite.offsets

Whether SAN should ignore (treat as 0) finite offsets.

term.options

A list of additional arguments to be passed to term initializers. It can also be set globally via option(ergm.term=list(...)).

seed

Seed value (integer) for the random number generator. See set.seed.

parallel

Number of threads in which to run the sampling. Defaults to 0 (no parallelism). See the entry on parallel processing for details and troubleshooting.

parallel.type

API to use for parallel processing. Supported values are "MPI" and "PSOCK". Defaults to using the parallel package with PSOCK clusters. See ergm-parallel

parallel.version.check

Logical: If TRUE, check that the version of ergm running on the slave nodes is the same as that running on the master node.

Details

This function is only used within a call to the san function. See the usage section in san for details.

Value

A list with arguments as components.

See Also


ergm

Fit, Simulate and Diagnose Exponential-Family Models for Networks

v3.11.0
GPL-3 + file LICENSE
Authors
Mark S. Handcock [aut], David R. Hunter [aut], Carter T. Butts [aut], Steven M. Goodreau [aut], Pavel N. Krivitsky [aut, cre] (<https://orcid.org/0000-0002-9101-3362>), Martina Morris [aut], Li Wang [ctb], Kirk Li [ctb], Skye Bender-deMoll [ctb], Chad Klumb [ctb], Michał Bojanowski [ctb], Ben Bolker [ctb]
Initial release
2020-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.