Learn R Programming

ergm (version 3.1.3)

ergm.bridge.llr: A simple implementation of bridge sampling to evaluate log-likelihood-ratio between two ERGM configurations

Description

This function uses bridge sampling with geometric spacing to estimate the difference between the log-likelihoods of two parameter vectors for an ERGM via repeated calls to simulate.formula.ergm.

Usage

ergm.bridge.llr(object, 
                  response=NULL, 
                  constraints=~., 
                  from, 
                  to, 
                  basis=NULL, 
                  verbose=FALSE, 
                  ..., 
                  llronly=FALSE, 
                  control=control.ergm.bridge())

Arguments

object
A model formula. See ergm for details.
response
Not for release.
constraints
A one-sided formula specifying one or more constraints on the support of the distribution of the networks being simulated. See the documentation for a similar argument for ergm for more information
from, to
The initial and final parameter vectors.
basis
An optional network object to start the Markov chain. If omitted, the default is the left-hand-side of the object.
verbose
Logical: If TRUE, print detailed information.
...
Further arguments to simulate.formula.ergm.
llronly
Logical: If TRUE, only the estiamted log-ratio will be returned.)
control
Control arguments. See control.ergm.bridge for details.

Value

  • If llronly=TRUE, returns the scalar log-likelihood-ratio. Otherwise, returns a list with the following components:
  • llrThe estimated log-ratio.
  • llrsThe estimated log-ratios for each of the nsteps bridges.
  • pathA numeric matrix with nsteps rows, with each row being the respective bridge's parameter configuration.
  • statsA numeric matrix with nsteps rows, with each row being the respective bridge's vector of simulated statistics.
  • Dtheta.DuThe gradient vector of the parameter values with respect to position of the bridge.

References

Hunter, D. R. and Handcock, M. S. (2006) Inference in curved exponential family models for networks, Journal of Computational and Graphical Statistics.

See Also

simulate.formula.ergm