Open victorhartman opened 2 years ago
Sorting the coefficients with multiplot()
is tough. What do you do when for model 1 the order should coefficients a,c,b and for model 2 the coefficients should be a,b,c? By the nature of {ggplot2}
all the points for a have to be together, and for b, etc.
If this were a tabular display you could have a two-stage sort, first by model then by coefficient. I'm not sure how to implement this for plots though.
If you have any ideas I'm happy to see what I can do.
Thanks for the response. I understand the difficulty of making this possible. My knowledge on R is however limited, so I don't think I can be of much help.
Is it however not easier in my case when I only select one coefficient (all my models are also exactly the same)?
My original issue, which is btw much easier, was that the names I provided did not sort in ascending order. I fixed this by adding + scale_y_discrete(limits = rev)
at the end.
The coefplot package has been very useful in creating graphs that easily and clearly explain results. Thank you for that!
Now I am trying to compare coefficients between different models, in effect comparing countries. However I am having a hard time getting the sort option to work. It does not seem to do anything when using 'by = 'model''. Also is it possible to reverse the sort order?
My code looks like this. I have several logit models with all the same coefficients.