Skip to content

Commit

Permalink
Add check_convergence method for parsnip _glm model (#605)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel <[email protected]>
  • Loading branch information
egouldo and strengejacke authored Sep 10, 2023
1 parent 0a620b9 commit eb8d4a1
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 @@ -45,6 +45,7 @@ S3method(check_collinearity,probitmfx)
S3method(check_collinearity,zerocount)
S3method(check_collinearity,zeroinfl)
S3method(check_concurvity,gam)
S3method(check_convergence,"_glm")
S3method(check_convergence,default)
S3method(check_convergence,glmmTMB)
S3method(check_convergence,merMod)
Expand Down
6 changes: 6 additions & 0 deletions R/check_convergence.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,9 @@ check_convergence.glmmTMB <- function(x, ...) {
# https://github.com/glmmTMB/glmmTMB/issues/275
isTRUE(x$sdr$pdHess)
}


#' @export
check_convergence._glm <- function(x, ...) {
isTRUE(x$fit$converged)
}

0 comments on commit eb8d4a1

Please sign in to comment.