Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
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

Request to change cplot.lm to cplot.default #84

Closed
lukesonnet opened this issue Jan 26, 2018 · 0 comments
Closed

Request to change cplot.lm to cplot.default #84

lukesonnet opened this issue Jan 26, 2018 · 0 comments
Labels
Milestone

Comments

@lukesonnet
Copy link

@lukesonnet lukesonnet commented Jan 26, 2018

Changing cplot.lm to cplot.default would let objects of an arbitrary S3 class that look like an lm object to take advantage of this great function without requiring users to use margins:::cplot.lm(obj).

This would be super helpful unless there's a justification for keeping it as cplot.lm!

Here's a MWE for estimatr:

devtools::install_github("DeclareDesign/estimatr")
lmres <- lm_robust(mpg ~ hp * wt, data = mtcars)
class(lmres)
#> [1] "lm_robust"
margins::margins(lmres, vce = "delta") # looks great!
margins:::cplot.lm(lmres, x = "hp", dx = "wt", what = "effect") # also looks great!
margins:::cplot.lm(lmres, x = "hp") # also looks great!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.