Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

estimateEffect() object compability (e.g. for marginal effects) #271

Open
TimBMK opened this issue Apr 13, 2022 · 0 comments
Open

estimateEffect() object compability (e.g. for marginal effects) #271

TimBMK opened this issue Apr 13, 2022 · 0 comments

Comments

@TimBMK
Copy link

TimBMK commented Apr 13, 2022

Hey, thank you for the great and very comprehensive package!

As I've been working more with the regression-side of STMs lately, I've been wondering if it is at all possible to have the output of estimateEffect() play ball with functions from other packages, e.g. ggeffects' ggeffect() or marginaleffects' marginaleffects(). While I'm specifically looking to get the marginal effects for my model, I think interoperability here would open a lot of possibilities for all kinds of statistical testing and estimations.

I looked at the estimateEffect() code and it looks like the main issue may be related to the fact that you only provide summarised qr.lm models in the estimateEffect object. Wouldn't it be possible to add the actual model to the estimateEffect object for other functions to pick up? Or is the output of the qr.lm() model ran on thetasims vastly different from any other model output?

While this is partly a feature request, I'm also happy about any input regarding the possibility of getting marginal effects for the model without sacrificing the advantages of estimateEffects() (calculating uncertainty etc.). While it is of course possible to fit a different model (e.g. a GAM), I am aware that estimateEffects() deals with certain pecularities of the STMs in a superior way, making it preferable to other models.

Edit: After a closer look at the inner workings of estimateEffect(), I realized the qr.lm() function is also missing certain outputs that come with the regular lm() function. Is there a particular reason these variables (e.g. the term object) are not included in qr.lm()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant