Skip to content

Support new models #49

@vincentarelbundock

Description

@vincentarelbundock

IF THE MODEL YOU WOULD LIKE TO SUPPORT IS NOT LISTED BELOW, PLEASE OPEN A NEW ISSUE.

It is often very easy to add support for new models. If you would like to help us do it (thanks!!!), please read this vignette on marginaleffects extensions: https://vincentarelbundock.github.io/marginaleffects/articles/extensions.html

marginaleffects only supports modeling packages released on CRAN. If you would like to add support for a non-CRAN package, your code can be hosted in the user-submitted (b
ut unsupported) code library in the vignette above.

If you cannot contribute code to support a new model, and if that model is not listed below, please open a new issue with a working example using a small publicly available dataset.

Seems possible

Challenges

Existing issues (with some notes)

predict problem

vcov problem

Categorical / Multinomial DV

  • VGAM::vglm: not just multinomial
  • VGAM::vgam

Not currently planned

Spatial regression

Spatial regression models typically rely on very different data structures, and are currently considered out of scope for marginaleffects

Multi-row data structure

Some multinomial models require dataset to be presented with one observation-choice combination per row. The whole marginaleffects infrastrcture is designed to create contrasts 1 row at a time, so we cannot support these.

No formula interface

Very different object structure

  • metafor: Very different input data. Likely very difficult to support. Would need code submission from an expert contributor. Support: metafor (rma, rma.mv) #604
  • lavaan: Vincent has no experience with this package. We could consider this, but it would require serious code contributions. Support: lavaan #499
  • R-INLA: Very different and unlikely. Support: R-INLA #342
  • Apollo for choice models. Seems extremely idiosyncratic, and does not appear to supply any of the standard methods such as vcov(), coef(), or predict(). Supporting this is likely to be a major challenge. Vincent is unlikely to do this himself without significant help (or more likely a quasi-complete PR) from a contributor. https://cran.r-project.org/web/packages/apollo/index.html
  • cmprsk::crr: Seems very different. Vincent will not implement this unless someone is willing to help.

Already supported via tidymodels or mlr3

Not on CRAN

Supported by other packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions