Skip to content

Commit

Permalink
Added a logLik() method for ergm.ego objects, printing an informative…
Browse files Browse the repository at this point in the history
… error message.

fixes #81
  • Loading branch information
krivit committed Oct 10, 2024
1 parent 9d312e2 commit d93693f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ S3method(ergm.ego_get_vattr,"function")
S3method(ergm.ego_get_vattr,character)
S3method(ergm.ego_get_vattr,formula)
S3method(gof,ergm.ego)
S3method(logLik,ergm.ego)
S3method(mixingmatrix,egor)
S3method(na.omit,egor)
S3method(plot,gof.ergm.ego)
Expand Down
6 changes: 6 additions & 0 deletions R/summary.ergm.ego.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ print.summary.ergm.ego <- function (x, ...){
NextMethod("print", object=x, ..., print.deviances=FALSE)
}

#' @method logLik ergm.ego
#' @export
#' @noRd
logLik.ergm.ego <- function(object, ...){
stop("Log-likelihood is not meaningful for moments-based inference used by ", sQuote("ergm.ego()"), ".")
}

0 comments on commit d93693f

Please sign in to comment.