Skip to content

Commit

Permalink
Don't print or calc EDF by default
Browse files Browse the repository at this point in the history
Too slow on giant models
  • Loading branch information
seananderson committed Dec 16, 2024
1 parent 3df3729 commit af6267e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# sdmTMB (development version)

* Add EDF (effective degrees of freedom) printing to smoothers with
`print.sdmTMB()` and `summary.sdmTMB()`. #383 #387
`print.sdmTMB()` and `summary.sdmTMB()`. Set argument `edf = TRUE`.
E.g. `print(fit, edf = TRUE)`. #383 #387

* Add `cAIC()` for calculating *conditional* AIC. Theory based on
<https://arxiv.org/abs/2411.14185>; also see
Expand Down
8 changes: 4 additions & 4 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -1521,10 +1521,10 @@ sdmTMB <- function(
bad_eig = conv$bad_eig,
pos_def_hessian = sd_report$pdHess))
out <- `class<-`(out, "sdmTMB")
if (out$tmb_data$has_smooths) {
edf <- suppressMessages(cAIC(out, what = "EDF"))
out$edf <- edf
}
# if (out$tmb_data$has_smooths) {
# edf <- suppressMessages(cAIC(out, what = "EDF"))
# out$edf <- edf
# }
out
}

Expand Down
2 changes: 1 addition & 1 deletion R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ print_header <- function(x) {
cat(info$overall_family)
}

print_one_model <- function(x, m = 1, edf = TRUE, silent = FALSE) {
print_one_model <- function(x, m = 1, edf = FALSE, silent = FALSE) {
if (edf) {
.edf <- suppressMessages(cAIC(x, what = "EDF"))
} else {
Expand Down

0 comments on commit af6267e

Please sign in to comment.