JavierMtzRdz / tidydelta

This repository contains the codes to implement the delta method in the tidyverse framework.
https://javiermtzrdz.github.io/tidydelta/
Other
4 stars 0 forks source link

marginaleffects #12

Open vincentarelbundock opened 2 months ago

vincentarelbundock commented 2 months ago

Hi,

I just noticed.the CRAN release. Congratulations!

In case this can prevent duplication of efforts, I thought I'd point out that the marginaleffects package has a simpler (but much more flexible) implementation of the delta method.

You might be in interested in the hypotheses() function described in this vignette: https://marginaleffects.com/vignettes/hypothesis.html

Also note that the outputs of that package are also perfectly "tidy": they are simple data frames which follow the broom column naming conventions.

JavierMtzRdz commented 2 months ago

Hi!

I am a fan of the work you've done with marginaleffects! I remember the old marginaleffects::deltamethod(), which has been replaced by hypotheses(). The main difference is that tidydelta() can take a tibble or data frame, while hypotheses() is focused on model objects. In comparison to car::deltaMethod(), it provides more flexibility in providing inputs.

As for avoiding duplication of efforts, it is a coding and package-making exercise. Since I've already put in the work, I thought of sharing it in case it could be helpful for anyone looking for a Delta Method with these features.

vincentarelbundock commented 2 months ago

I remember the old marginaleffects::deltamethod(), which has been replaced by hypotheses().

Cool cool.

As for avoiding duplication of efforts, it is a coding and package-making exercise. Since I've already put in the work, I thought of sharing it in case it could be helpful for anyone looking for a Delta Method with these features.

Love this attitude!

The main difference is that tidydelta() can take a tibble or data frame, while hypotheses() is focused on model objects.

FYI, marginaleffects::hypotheses() also takes a tibble or data frame. See example here: https://marginaleffects.com/vignettes/hypothesis.html#arbitrary-quantities

JavierMtzRdz commented 2 months ago

FYI, marginaleffects::hypotheses() also takes a tibble or data frame. See example here: https://marginaleffects.com/vignettes/hypothesis.html#arbitrary-quantities

Thanks for bringing this up. I wasn't aware of this approach to using marginaleffects::hypotheses()! 🙌🏽