A logLik method for stergm.

Share:

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'stergm'
logLik(object, 
                      add=FALSE, 
                      force.reeval=FALSE, 
                      eval.loglik=add || force.reeval, 
                      control=control.logLik.stergm(), 
                      ...)

## S3 method for class '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.

Details

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

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.

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