Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up`at` and factors #116
Comments
leeper
added
the
enhancement
label
Feb 20, 2019
This comment has been minimized.
This comment has been minimized.
Yea, this has been a problem at times. I guess it needs to be character. We should add:
|
This comment has been minimized.
This comment has been minimized.
Good to know. I'll try to take a look at this if/when I ever complete the plotting project. Would you be interested in adding a bunch of input checks with something like this: https://github.com/mllg/checkmate |
This comment has been minimized.
This comment has been minimized.
The levels are also being written as numbers rather than their labels: m <- lm(Sepal.Length ~ Sepal.Width * Species, data = iris)
> margins(m, iris, at = list(Species = c("setosa", "versicolor")))
Average marginal effects at specified values
lm(formula = Sepal.Length ~ Sepal.Width * Species, data = iris)
at(Species) Sepal.Width Speciesversicolor
setosa 0.6905 1.435
versicolor 0.8651 1.435
> summary(.Last.value)
factor Species AME SE z p lower upper
Sepal.Width 1.0000 0.6905 0.1657 4.1664 0.0000 0.3657 1.0153
Sepal.Width 2.0000 0.8651 0.2002 4.3212 0.0000 0.4727 1.2575
Speciesversicolor 1.0000 1.4345 0.1217 11.7846 0.0000 1.1959 1.6731
Speciesversicolor 2.0000 1.4345 0.1217 11.7846 0.0000 1.1959 1.6731 which is unintuitive. |
leeper
added
bug
documentation
help wanted
labels
Apr 10, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vincentarelbundock commentedFeb 18, 2019
Please specify whether your issue is about:
What is the proper way to specify factor values in the
at
list?