Skip to content

Convergence checks for additive submodels #479

Open
@fweber144

Description

@fweber144
Collaborator

As mentioned in #478, the convergence checks for additive models are probably still incomplete, even with PR #478 being merged now. I have added corresponding TODO comments in the code, lines

# TODO (GAMs): Is this correct?:
return(fit_s$converged && fit_s$mgcv.conv$fully.converged %||% TRUE)
and
# TODO (GAMMs): I couldn't find any convergence-related information in
# element `fit_s$gam`, so the GAM part is currently not checked for
# convergence. For now, all we can check is the GLMM part from element
# `fit_s$mer`:

@AlejandroCatalina, do you know if (and if yes, how) we could improve our check for convergence of the submodel fits from fit_gam_callback() and fit_gamm_callback()?

Activity

added
additiveIssues concerning additive models (GAMs and GAMMs).
on Nov 22, 2023
AlejandroCatalina

AlejandroCatalina commented on Nov 23, 2023

@AlejandroCatalina
Collaborator

Aside from the diagnostics fit_s$gam would provide I'm not sure how much we could inject it. I would suspect we can indeed run some diagnostics on top. For GAM I'd think that similar diagnostics to GLM should work, as it's fitting an augmented GLM underneath, and for GAMM one would need to check the quality of the laplace approximation, but this may not be very obvious from outside.

fweber144

fweber144 commented on Nov 23, 2023

@fweber144
CollaboratorAuthor

Actually, I was looking for some output element of the submodel fits returned by fit_gam_callback() and fit_gamm_callback() that indicates convergence. So for GAMs, I would need approval that

# TODO (GAMs): Is this correct?:
return(fit_s$converged && fit_s$mgcv.conv$fully.converged %||% TRUE)
is correct and for GAMMs, I wonder where the same elements from gamm_fit_s$gam are (where gamm_fit_s indicates an object returned by fit_gamm_callback()). Implementing own diagnostics is not a bad idea, but usually, there is always a convergence indicator somewhere in the output object (so we wouldn't have to implement new diagnostics ourselves).

AlejandroCatalinaF

AlejandroCatalinaF commented on Nov 27, 2023

@AlejandroCatalinaF

I believe that line is okay, but I haven't worked with that package for some time, so I'm afraid I can give you much insight regarding their internals.

fweber144

fweber144 commented on Nov 30, 2023

@fweber144
CollaboratorAuthor

No problem, I understand. Then I guess someone needs to inspect this in detail in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    additiveIssues concerning additive models (GAMs and GAMMs).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @AlejandroCatalina@fweber144@AlejandroCatalinaF

        Issue actions

          Convergence checks for additive submodels · Issue #479 · stan-dev/projpred