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

ergm.bridge.llr

Bridge sampling to evaluate ERGM log-likelihoods and log-likelihood ratios


Description

ergm.bridge.llr 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.

ergm.bridge.0.llk is a convenience wrapper that returns the log-likelihood of configuration θ relative to the reference measure. That is, the configuration with θ=0 is defined as having log-likelihood of 0.

ergm.bridge.dindstart.llk is a wrapper that uses a dyad-independent ERGM as a starting point for bridge sampling to estimate the log-likelihood for a given dyad-dependent model and parameter configuration. Note that it only handles binary ERGMs (response=NULL) and with constraints (constraints=) that that do not induce dyadic dependence.

Usage

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

ergm.bridge.0.llk(
  object,
  response = response,
  constraints = ~.,
  coef,
  ...,
  llkonly = TRUE,
  control = control.ergm.bridge()
)

ergm.bridge.dindstart.llk(
  object,
  response = NULL,
  constraints = ~.,
  coef,
  dind = NULL,
  coef.dind = NULL,
  basis = NULL,
  ...,
  llkonly = TRUE,
  control = control.ergm.bridge()
)

Arguments

object

A model formula. See ergm for details.

response

Name of the edge attribute whose value is to be modeled in the valued ERGM framework. Defaults to NULL for simple presence or absence, modeled via a binary ERGM.

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 ergm.bridge.llr and simulate.formula.ergm.

llronly

Logical: If TRUE, only the estiamted log-ratio will be returned by ergm.bridge.llr.

control

Control arguments. See control.ergm.bridge for details.

coef

A vector of coefficients for the configuration of interest.

llkonly

Whether only the estiamted log-likelihood should be returned by the ergm.bridge.0.llk and ergm.bridge.dindstart.llk. (Defaults to TRUE.)

dind

A one-sided formula with the dyad-independent model to use as a starting point. Defaults to the dyad-independent terms found in the formula object with an overal density term (edges) added if not redundant.

coef.dind

Parameter configuration for the dyad-independent starting point. Defaults to the MLE of dind.

Value

If llronly=TRUE or llkonly=TRUE, these functions return the scalar log-likelihood-ratio or the log-likelihood. Otherwise, they return a list with the following components:

llr

The estimated log-ratio.

llrs

The estimated log-ratios for each of the nsteps bridges.

path

A numeric matrix with nsteps rows, with each row being the respective bridge's parameter configuration.

stats

A numeric matrix with nsteps rows, with each row being the respective bridge's vector of simulated statistics.

Dtheta.Du

The gradient vector of the parameter values with respect to position of the bridge.

ergm.bridge.0.llk result list also includes an llk element, with the log-likelihood itself (with the reference distribution assumed to have likelihood 0).

ergm.bridge.dindstart.llk result list also includes an llk element, with the log-likelihood itself and an llk.dind element, with the log-likelihood of the nearest dyad-independent model.

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


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.