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

add a "glance" method #282

Closed
acoppock opened this issue Jan 22, 2019 · 14 comments
Closed

add a "glance" method #282

acoppock opened this issue Jan 22, 2019 · 14 comments

Comments

@acoppock
Copy link
Collaborator

Someone made a new regression output package built on the soon-to-be-released gt package. Estimatr isn't compatbile yet because we need a "glance" method:

library(gtsummary)
library(estimatr)

fit_1 <- lm_robust(mpg ~ hp, data = mtcars)
fit_2 <- lm_robust(mpg ~ hp, se_type = "classical", data = mtcars)

gtsummary(list(fit_1, fit_2))
Error: No glance method for objects of class lm_robust

@acoppock
Copy link
Collaborator Author

@graemeblair
Copy link
Member

@lukesonnet
Copy link
Contributor

lukesonnet commented Jan 23, 2019

Will implement ASAP (hopefully today!) or should I wait for vincent

@graemeblair
Copy link
Member

yes please implement! thank you!

@nfultz
Copy link
Contributor

nfultz commented Jan 23, 2019

Extend via generics, same as tidy - https://github.com/r-lib/generics/blob/master/R/glance.R

@lukesonnet
Copy link
Contributor

Yep, thanks!

@lukesonnet
Copy link
Contributor

Added glance for lm_robust and a Rbuildignored test for gt and gtsummary. Should I add iv_robust, and just present the second stage?

@graemeblair
Copy link
Member

I don't think it should be about first or second but what are the right set of statistics about the IV model. Over-identification test, test of weak instruments, ...? statistic and p-values?

@lukesonnet
Copy link
Contributor

lukesonnet commented Jan 24, 2019 via email

@graemeblair
Copy link
Member

Sorry misunderstood, what's the main body? I thought it was one row with a set of model fit statistics.

@lukesonnet
Copy link
Contributor

Ah yes. That's glance. I was thinking about gtsummary and the estimates and coefficients.

@lukesonnet
Copy link
Contributor

Next step is to:

  • mimic glance.ivreg and include standard IV metrics
  • ensure that gtsummary takes the 2sls estimates in the main body
  • I'll also try to do difference in means where it has basic metrics (including design type) in the glance

I'll try to do that today and then I'll open the PR.

@vincentarelbundock
Copy link
Contributor

Funny. I came here to see if a glance had been requested before only to find that my specific issue was being discussed and worked on. Thanks, I appreciate it!

Let me know if there's anything I can do to help.

@lukesonnet
Copy link
Contributor

Done in #285

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

No branches or pull requests

5 participants