Git Product home page Git Product logo

Comments (4)

gavinsimpson avatar gavinsimpson commented on June 20, 2024

I've been a bit inconsistent with this but where appropriate I planned to support lm() and glm() from base R — appraise() works for those models for example. I hadn't considered supporting glmmTMB(); I'll be more motivated to do this if/once we have penalised splines in glmmTMB().

Are there models/functions/packages that you are especially interested in? And which functions in gratia would you like to see supported for them?

There are other more general options for a wider range of model types, like marginaleffects.

from gratia.

seanhardison1 avatar seanhardison1 commented on June 20, 2024

That makes sense. I was not aware that appraise works for lm and glm, but that's great to hear. The functions in gratia that I use the most are draw and appraise, so those would have to be my top choices.

Outside of mgcv, glmmTMB, and base R, the only other modeling package I use frequently is sdmTMB. sdmTMB models can include smooths fitted via mgcv, but I haven't tried them with gratia yet. It would be very cool to be able to visualize spatiotemporal predictions from sdmTMB models using draw alone, similar to how you can use draw to visualize 2D smooths etc. The predictions from sdmTMB models are already tidy too!

Tagging @seananderson in the hopes that this one day becomes reality

from gratia.

authagag avatar authagag commented on June 20, 2024

Opening this up again as glmmTMB has added spline support, see
glmmTMB/glmmTMB#928

There is some discussion of adding support in gratia. Looking through the code it seems that there would need to be a draw.glmmTMB method as well as a smooths.glmmTMB method to find all the smooth terms in the glmmTMB structure. Is there anything I am missing, pretty sure there is more

from gratia.

gavinsimpson avatar gavinsimpson commented on June 20, 2024

@authagag Oh, that saves me a job then as I had been looking at what would be required to add smooths to glmmTMB, gamm4-style.

The main thing that would be needed would be smooth_estimates() and parametric_effects() methods for class "glmmTMB". Assuming that glmmTMB does sensible things like store the actual mgcv smooth objects in model$smooths then most things should just work, and specific methods could simply just call the "gam" methods for the plotting code. Things could get more complex if the objects returned by glmmTMB() don't have many of the things that I'd find in a "gam" object as then specific methods for many internal functions could be needed.

I can take a look at glmmTMB/glmmTMB#928 and install from the repo and see what would be needed from gratia's point of view.

from gratia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.