Skip to content

Commit

Permalink
Fix nesmr AIC
Browse files Browse the repository at this point in the history
  • Loading branch information
stefaneng committed Oct 28, 2024
1 parent 28db382 commit 88b5cc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/aic.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @export
nesmr_aic <- function(fit, ...) {
if (fit$is_nesmr) {
-2 * log_py(fit, ...) + 2 * sum(fit$direct_effect_template)
if ("B_template" %in% names(fit)) {
-2 * log_py(fit, ...) + 2 * sum(fit$B_template)
}
}

0 comments on commit 88b5cc4

Please sign in to comment.