tergm (version 3.6.1)

logLik.stergm: A logLik method for stergm.

Description

Functions to return the log-likelihood associated with a stergm CMLE fit, evaluating it if necessary. See logLik.ergm documentation for details and caveats.

logLikNull method computes the null model likelihood. See ergm::logLikNull().

Usage

# S3 method for stergm
logLik(object, add = FALSE, force.reeval = FALSE,
  eval.loglik = add || force.reeval, control = control.logLik.stergm(),
  ...)

# S3 method for stergm logLikNull(object, control = control.logLik.stergm(), ...)

Arguments

object

A stergm fit, returned by stergm, for estimate="CMLE".

add

Logical: If TRUE, instead of returning the log-likelihood, return object with log-likelihood value set.

force.reeval

Logical: If TRUE, reestimate the log-likelihood even if object already has an estiamte.

eval.loglik

Logical: If TRUE, evaluate the log-likelihood if not set on object.

control

A list of control parameters for algorithm tuning. Constructed using control.logLik.ergm.

Other arguments to the likelihood functions.

Value

For logLik.stergm, add=FALSE (the default), a logLik object. If add=TRUE (the default), an ergm object or a stergm object with the log-likelihood set. For logLikNull.stergm, a logLik object.

Details

If the log-likelihood was not computed for object, produces an error unless eval.loglik=TRUE

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

logLik, ergm.bridge.llr, ergm.bridge.dindstart.llk