Skip to content

Document API #946

Closed
Closed

Description

@strengejacke

See easystats/easystats#73

To add support for models, especially for parameters and including all features, we need following methods:

  • insight::find_formula()
  • insight::model_info()
  • insight::get_parameters()
  • insight::get_statistic()
  • insight::find_statistic()
  • insight::get_varcov()
  • insight::get_df()

In other packages, these are optional, when the above methods work fine:

  • parameters::ci()
  • parameters::p_value()
  • parameters::standard_error() or insight::get_varcov()

Nice to have (though some could already work if the above methods are implemented):

  • insight::find_parameters()
  • insight::get_modelmatrix()
  • insight::get_predicted()
  • insight::link_inverse() and insight::link_function()
  • insight::get_residuals()

The simple way is just adding a method for parameters::model_parameters(), however, than this model-class is not supported by all functions we offer in the easystats eco-system.

I think we need a vignette on the API, explaining how to add methods/support for new models, similar to what @mattansb has done here: https://easystats.github.io/effectsize/articles/effectsize_API.html

Maybe we can split those vignettes into two (or more?) parts:

  • What to do to add new methods for extracting/tidying parameters? That would only require a method for model_parameters().
  • What to do to add new methods for some easystats support? (I'm thinking of check_model(), which seems to be often used by users) This would probably require some more methods - must check.
  • What to do to add new methods for full easystats support? This would need methods in insight, maybe also parameters or bayestestR.

Activity

  1. pinned this issue on Mar 1, 2025
  2. jmgirard commented on Oct 16, 2026

    @jmgirard
    Contributor

    Addressed by the vignette "Adding support for new model classes" (vignettes/newmodels.Rmd, added in e75b289). It lists the required and the nice-to-have insight methods, and the model_parameters()-only route for tidy output. It has no section on what check_model() needs. That can go in a new issue if it is still wanted.

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

    Docs 📚Something to be adressed in docs and/or vignettes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions