diff --git a/README.qmd b/README.qmd index 66197b46d..3d1343272 100644 --- a/README.qmd +++ b/README.qmd @@ -1,3 +1,5 @@ + + ![](man/figures/zoo_banner.png) Parameter estimates are often hard to interpret substantively, especially when they are generated by complex models with non-linear components, interactions, or transformations. Instead of reporting unintuitive parameters, data analysts would rather focus on simple quantities of interest, which have straightforward scientific interpretations. Unfortunately, meaningful estimands---and their standard errors---are often tedious to compute, and the terminology used to describe them varies tremendously across fields. @@ -66,4 +68,4 @@ The `marginaleffects` package and the Marginal Effects Zoo book will always be f

- \ No newline at end of file + diff --git a/vignettes/extensions.qmd b/vignettes/extensions.qmd index 95d3db29a..2f092e734 100644 --- a/vignettes/extensions.qmd +++ b/vignettes/extensions.qmd @@ -150,6 +150,17 @@ predictions(model, newdata = mtcars) |> head() Note that, for custom model, we typically have to supply values for the `newdata` and `variables` arguments explicitly. + +### Merging your extension in `marginaleffects` + +If you write a working extension for a package on CRAN, please consider submitting your code for inclusion in the package. Other users could greatly benefit from your work! + +The steps to do so are pretty much the same as outlined above. However, + +1. Instead of calling `options(marginaleffects_model_classes)`, you need to add your model class to the permanent list of supported models in `R/sanitize_model.R` +2. Add the package to the supported models vignette by editing this file: `data-raw/supported_models.csv` +3. Add the valid prediction `type` values to `R/type_dictionary.R` Note that the first row you insert will be the default prediction type, so please choose something standard and intuitive like "response". + ## Modify or extend supported models Let's say you want to estimate a model using the `mclogit::mblogit` function. That package is already supported by `marginaleffects`, but you want to use a `type` (scale) of predictions that is not currently supported: a "centered link scale." @@ -205,4 +216,4 @@ Finally, we can call any `slopes` function and obtain results. Notice that our o avg_predictions(model) avg_predictions(model_custom) -``` \ No newline at end of file +```