fsolt / dotwhisker

Dot-and-Whisker Plots of Regression Results
https://fsolt.org/dotwhisker/
Other
57 stars 10 forks source link

order_vars not working with lmer models? #94

Closed misea closed 2 years ago

misea commented 4 years ago

In version 0.5.0 this seems to work fine:

dwplot(lmer(mpg~hp+wt+(1|cyl), data=mtcars))

But this yields a plot with axes but no data/ticks

dwplot(lmer(mpg~hp+wt+(1|cyl), data=mtcars), order_vars = c('wt', 'hp', 'sd__(Intercept)', 'sd__Observation'))

I have tried order_vars without the sd__ variables, but to no avail. It's a straightforward workaround to arrange a tidy dataframe, but wanted to report issue, or find out if I'm misunderstanding the correct usage.

sammo3182 commented 3 years ago

I can't replicate your issue. The plot looks fine in my side. Perhaps just try the dev version? Let me know if there's still a problem

library(dotwhisker)
library(lme4)

dwplot(lmer(mpg~hp+wt+(1|cyl), data=mtcars), order_vars = c('wt', 'hp'))

In version 0.5.0 this seems to work fine:

dwplot(lmer(mpg~hp+wt+(1|cyl), data=mtcars))

But this yields a plot with axes but no data/ticks

dwplot(lmer(mpg~hp+wt+(1|cyl), data=mtcars), order_vars = c('wt', 'hp', 'sd__(Intercept)', 'sd__Observation'))

I have tried order_vars without the sd__ variables, but to no avail. It's a straightforward workaround to arrange a tidy dataframe, but wanted to report issue, or find out if I'm misunderstanding the correct usage.

sammo3182 commented 2 years ago

I'll close the issue since there's been no further feedback for a long time. Free to reopen it if the mentioned problem still bothers you. A replicable example will be very helpful. Thanks!