Skip to content

Sort not working in multiplot when using 'by = 'model'' #24

Description

@victorhartman

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.

coefplot::multiplot(`logit_model_Belize_2015-2016`,
                    `logit_model_Costa Rica_2011`,
                    logit_model_Cuba_2019,
                    `logit_model_Dominican Republic_2014`,
                    logit_model_Guyana_2014,
                    logit_model_Mexico_2015,
                    logit_model_Panama_2013,
                    logit_model_Suriname_2018,
                    `logit_model_Trinidad and Tobago_2011`,
                    `logit_model_Uruguay_2012-13`,
                    coefficients = "weighted_excluded",
                    names = c("Belize",
                              "Costa Rica",
                              "Cuba",
                              "Dominican Republic",
                              "Guyana",
                              "Mexico",
                              "Panama",
                              "Suriname",
                              "Trinidad",
                              "Uruguay"),
                    sort = 'magnitude',
                    by = "Model")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions