Open jbohenek opened 1 year ago
This is only needed/useful for categorical focal terms, right?
Yes, what I currently do is convert to tibble, sort, and then construct my own ggplot.
ap_duck3_ss<-ggemmeans(gam4,~species*site) |> as_tibble() |> mutate(x = fct_reorder (x,predicted))
Hey all,
First - I love the package. I teach it in my R course. Thanks for making such a useful package.
Would it be possible to implement an effect ordering option for plotting ggpredict objects? For example, you plot many effect estimates and you want to order them by size (either ascending or descending). Typically, one would do this by hand, but that would require remaking the prediction df and ordering variables, which is a tedious step that ggpredict allows us to skip entirely (thank god). e.g.,
ggpredict(fit, ~x) |> plot(order=T)
Ben Bolker has a utility function to do with dot whisker plots available on his github. Perhaps something similar could be implemented? https://github.com/eco4cast/Statistical-Methods-Seminar-Series/blob/main/bolker_mixedmodels/utils.R
If this option is already available, then I feel stupid :)
-Cheers J