control.ergm(drop=TRUE,
init=NULL, init.method=NULL, main.method=c("MCMLE","Robbins-Monro", "Stochastic-Approximation","Stepping"), force.main=FALSE, main.hessian=TRUE,
MPLE.max.dyad.types=1e+6, MPLE.samplesize=50000, MPLE.type=c("glm", "penalized"), MCMC.prop.weights="default", MCMC.prop.args=list(), MCMC.interval=1024, MCMC.burnin=MCMC.interval*16, MCMC.samplesize=1024, MCMC.effectiveSize=NULL, MCMC.effectiveSize.damp=10, MCMC.effectiveSize.maxruns=1000, MCMC.effectiveSize.base=1/2, MCMC.effectiveSize.points=5, MCMC.effectiveSize.order=1, MCMC.return.stats=TRUE, MCMC.runtime.traceplot=FALSE, MCMC.init.maxedges=20000, MCMC.max.maxedges=Inf, MCMC.addto.se=TRUE, MCMC.compress=FALSE, MCMC.packagenames=c(),
SAN.maxit=10, SAN.burnin.times=10, SAN.control=control.san(coef=init, SAN.prop.weights=MCMC.prop.weights, SAN.prop.args=MCMC.prop.args, SAN.init.maxedges=MCMC.init.maxedges, SAN.burnin=MCMC.burnin * SAN.burnin.times, SAN.interval=MCMC.interval, SAN.packagenames=MCMC.packagenames, MPLE.max.dyad.types=MPLE.max.dyad.types, parallel=parallel, parallel.type=parallel.type, parallel.version.check=parallel.version.check),
MCMLE.termination=c("Hummel", "Hotelling", "precision", "none"), MCMLE.maxit=20, MCMLE.conv.min.pval=0.5, MCMLE.NR.maxit=100, MCMLE.NR.reltol=sqrt(.Machine$double.eps), obs.MCMC.samplesize=MCMC.samplesize, obs.MCMC.interval=MCMC.interval, obs.MCMC.burnin=MCMC.burnin, obs.MCMC.burnin.min=obs.MCMC.burnin/10, obs.MCMC.prop.weights=MCMC.prop.weights, obs.MCMC.prop.args=MCMC.prop.args,
MCMLE.check.degeneracy=FALSE, MCMLE.MCMC.precision=0.005, MCMLE.MCMC.max.ESS.frac=0.1, MCMLE.metric=c("lognormal", "logtaylor", "Median.Likelihood", "EF.Likelihood", "naive"), MCMLE.method=c("BFGS","Nelder-Mead"), MCMLE.trustregion=20, MCMLE.dampening=FALSE, MCMLE.dampening.min.ess=20, MCMLE.dampening.level=0.1, MCMLE.steplength.margin=0.05, MCMLE.steplength=if(is.null(MCMLE.steplength.margin)) 0.5 else 1, MCMLE.adaptive.trustregion=3, MCMLE.sequential=TRUE, MCMLE.density.guard.min=10000, MCMLE.density.guard=exp(3), MCMLE.effectiveSize=NULL, MCMLE.last.boost=4, MCMLE.Hummel.esteq=TRUE, MCMLE.Hummel.miss.sample=100, MCMLE.Hummel.maxit=25, MCMLE.steplength.min=0.0001,
SA.phase1_n=NULL, SA.initial_gain=NULL, SA.nsubphases=4, SA.niterations=NULL, SA.phase3_n=NULL, SA.trustregion=0.5,
RM.phase1n_base=7, RM.phase2n_base=100, RM.phase2sub=7, RM.init_gain=0.5, RM.phase3n=500,
Step.MCMC.samplesize=100, Step.maxit=50, Step.gridsize=100,
CD.nsteps=8, CD.multiplicity=1, CD.nsteps.obs=128, CD.multiplicity.obs=1, CD.maxit=60, CD.conv.min.pval=0.5, CD.NR.maxit=100, CD.NR.reltol=sqrt(.Machine$double.eps), CD.metric=c("naive", "lognormal", "logtaylor", "Median.Likelihood", "EF.Likelihood"), CD.method=c("BFGS","Nelder-Mead"), CD.trustregion=20, CD.dampening=FALSE, CD.dampening.min.ess=20, CD.dampening.level=0.1, CD.steplength.margin=0.5, CD.steplength=1, CD.adaptive.trustregion=3, CD.adaptive.epsilon=0.01, CD.Hummel.esteq=TRUE, CD.Hummel.miss.sample=100, CD.Hummel.maxit=25, CD.steplength.min=0.0001,
loglik.control=control.logLik.ergm(),
seed=NULL, parallel=0, parallel.type=NULL, parallel.version.check=TRUE, ...)
NA
vector equal in length to the number of
parameters in the model or NULL
(the default); the initial
values for the estimation and coefficient offset terms. If NULL
is passed, all of the initial values are computed using the method specified by
control$init.method
.
If a numeric vector is given, the elements of the vector are interpreted as follows:
offset()
are used as the fixed offset
coefficients. Note that offset coefficients alone can be more conveniently specified
using ergm
argument offset.coef
. If both
offset.coef
and init
arguments are given,
values in offset.coef
will take precedence.
NA
are used as starting values in the estimation.
NA
are fit
using the method specified by
control$init.method
.
Passing control.ergm(init=coef(prev.fit))
can be used to ``resume''
an uncoverged ergm
run, but see
enformulate.curved
.
NULL
. The default
method depends on the reference measure used. For the
binary ("Bernoulli"
) ERGMs, it's
maximum pseudo-likelihood estimation (MPLE). Other valid values include
"zeros"
for a 0
vector of appropriate length and
"CD"
for contrastive divergence. Valid initial methods for a given reference can be queried
using ergm.init.methods
.
MCMLE
attempts to maximize an approximation to the
log-likelihood function. Robbins-Monro
and
Stochastic-Approximation
are both
stochastic approximation algorithms that try to
solve the method of moments equation that yields the
MLE in the case of an exponential family model.
Another alternative is a partial stepping algorithm
(Stepping
) as in Hummel et al. (2012).
The direct use of the likelihood function has many theoretical
advantages over stochastic approximation, but the choice will
depend on the model and data being fit. See Handcock (2000) and
Hunter and Handcock (2006) for details. Note that in recent versions of ERGM, the enhancements of
Stepping
have been folded into the default MCMLE
,
which is able to handle more modeling scenarios.
MPLE.max.dyad.types
.
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. obs.MCMC.prop.weights
, if given separately, specifies the
weights to be used for the constrained MCMC when missing dyads are
present, defaulting to the same as MCMC.prop.weights
.
obs.MCMC.prop.args
, if given separately, specifies the
weights to be used for the constrained MCMC when missing dyads are
present, defaulting to the same as MCMC.prop.args
.
MCMLE.effectiveSize
to non-NULL value to adaptively
determine the burn-in and the MCMC length needed
to get the specified effective size using the method of Sahlin (2011); 50 is a reasonable value. This
feature is in experimental status until we verify the
coverage of the standard errors.
MCMC.samplesize
rows.
This matrix can be
used directly by the coda
package to assess MCMC
convergence.
MCMC.init.maxedges
, it will
be incremented by a factor of 10 if exceeded during fitting, up to
MCMC.max.maxedges
, at which point the process will stop with
an error.
SAN.burnin
relative to MCMC.burnin
. This lets one control the amount of SAN burn-in (arguably, the most important of SAN parameters) without overriding the other SAN.control defaults. san
.
See control.san
for details.
MCMLE.last.boost
. See Hummel et. al. (2012). Note that this criterion is incompatible with
MCMLE.steplength
$\ne$ 1 or MCMLE.steplength.margin
$=$ NULL
.
MCMLE.conv.min.pval
, the
estimation is considered to have converged and finishes. This was the default option
in ergm
version 3.1.
MCMLE.MCMC.precision
, and the Hummel step length is 1 for two consecutive
iterations. See MCMLE.MCMC.precision
for details. This
feature is in experimental status until we verify the coverage of the
standard errors.Note that this criterion is incompatible with $\code{MCMLE.steplength}\ne 1$ or $\code{MCMLE.steplength.margin}=\code{NULL}$.
MCMLE.maxit
iterations.
optim
rountine
in the MLE optimization. Note that by default, ergm uses trust
, and falls back
to optim
only when trust
fails.
MCMLE.MCMC.precision
is a vector of upper bounds on the standard errors induced by the MCMC algorithm, expressed as a percentage of the total standard error. The MCMLE algorithm will terminate when the MCMC standard errors are below the
precision bound, and the Hummel step length is 1 for two consecutive iterations. This is an experimental feature.
If effective sample size is used (see MCMC.effectiveSize
), then ergm may increase the target ESS
to reduce the MCMC standard error.
trust
, and falls back
to optim
with Nelder-Mead method when trust
fails.Note that not all metrics abide by it.
NULL
to use fixed step
length. Note that this parameter is required to be non-NULL
for MCMLE termination using Hummel or precision criteria.
MCMLE.adaptive.trustregion
. If MCMLE.steplength.margin
is not NULL
, the step
length will be set using the algorithm of Hummel et al. (2010). In
that case, it will serve as the maximum step length
considered. However, setting it to anything other than 1 will
preclude using Hummel or precision as termination criteria.
MCMLE.steplength="adaptive"
.
target.stats
in the ergm
function are far from the
initial network.
MCMLE.density.guard.min
edges and whose number of edges is
exceeds the observed network by more than
MCMLE.density.guard
, the optimization process will be stopped
with an error.
MCMLE.maxit
.
See Snijders (2002) for details.
MCMC.samplesize
).
See Hummel et al. (2012) for details.
CD.multiplicity
improves the estimate faster than
increasing CD.nsteps
--- up to a point --- but it also samples from the wrong
distribution, in the sense that while as
CD.nsteps
$\rightarrow\infty$, the CD estimate approaches
the MLE, this is not the case for CD.multiplicity
. In practice, MPLE, when available, usually outperforms CD for even a very high
CD.nsteps
(which is, in turn, not very stable), so CD is useful primarily when
MPLE is not available. This feature is to be considered
experimental and in flux.
The default values have been set experimentally, providing a reasonably stable, if not great, starting values.
CD.nsteps
and
CD.multiplicity
must be set to a relatively high value, as
the network passed is not necessarily a good start for
CD. Therefore, these settings are in effect if there are missing dyads in the observed
network, using a higher default number of steps.
MCMC.*
counterparts.Note that only the Hotelling's stopping criterion is implemented for CD.
set.seed
"MPI"
and
"PSOCK"
. Defaults to using the parallel
package with PSOCK clusters. See
ergm-parallel
ergm
running on the slave nodes is the
same as that running on the master node.
ergm
function.
See the usage
section in ergm
for details.
ergm
. The control.simulate
function performs a
similar function for
simulate.ergm
;
control.gof
performs a
similar function for gof
.