Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFix "vce" bug with length 1 "variables" argument #113
Conversation
This comment has been minimized.
This comment has been minimized.
I meant to add: Another strategy is to not make any use of library(margins)
fit <- lm(mpg ~ wt + hp * cyl, data = mtcars)
microbenchmark::microbenchmark(
margins(fit, vce = "bootstrap"),
margins(fit, vce = "bootstrap", variables = "hp")
)
#> Unit: milliseconds
#> expr min lq mean median uq max neval cld
#> margins(fit, vce = "bootstrap") 175.1137 180.3685 184.77140 184.57105 187.6936 218.1735 100 b
#> margins(fit, vce = "bootstrap", variables = "hp") 89.4291 93.0809 98.03813 96.67365 101.9262 116.3726 100 a
microbenchmark::microbenchmark(
margins(fit, vce = "simulation"),
margins(fit, vce = "simulation", variables = "hp")
)
#> Unit: milliseconds
#> expr min lq mean median uq max neval cld
#> margins(fit, vce = "simulation") 131.5059 135.8638 143.24005 141.6665 145.0785 315.2456 100 b
#> margins(fit, vce = "simulation", variables = "hp") 49.8094 51.6491 54.30603 52.4074 55.9454 79.2443 100 a So I think going in and fixing it in the general way I've done is best, especially since the total amount of new code is probably not that much different. |
This comment has been minimized.
This comment has been minimized.
Looks like something broke in the Introduction vignette? |
This comment has been minimized.
This comment has been minimized.
Edit: Oops, that's only with the CRAN version installed. |
This comment has been minimized.
This comment has been minimized.
I might suggest clearing your cache on Travis, this has resolved issues for me in the past. The issue on Appveyor is unrelated. |
This comment has been minimized.
This comment has been minimized.
Thanks! |
jacob-long commentedFeb 17, 2019
Please ensure the following before submitting a PR:
Closes #112
You can decide whether this exceeds the triviality threshold.
/R
not/man
and rundevtools::document()
to update documentation/tests
for any new functionality or bug fixR CMD check
runs without error before submitting the PRThere are tests failing (well, throwing warnings) on my machine, but they don't appear to be related to this issue.