I am using a binary logistic regression model to investigate the causes of populism in Denmark using the below regression model:
Denmark <- glm(popvt ~ trstprl + trstplt + stfgov + stfdem + mnactic + agegroup + eisced,
data = dktrim,
family = binomial(link = "logit"))
Where popvt is a two-level factor, trstprl/trstplt/stfgov/stfdem a set of integers ranging from 0-10, and mnactic, agegroup and eisced are four-, four- and three-level factors respectively.
After successfully running the regression I used sjPlot's plot_model to obtain a plot model of odds ratios for each independent variable, as shown here: Plot of Odds Ratios in explaining support for populist parties in Denmark through this code:
plot_DK <- plot_model(Denmark)
I would like to reduce the scale of the x-axis for odds ratios to between 0.1 and 5.
But when I attempt to do so with the following I get the error:
Scale for 'x' is already present. Adding another scale for 'x', which will replace the existing scale. Error: Discrete value supplied to continuous scale
plot_DK + xlim(0.1, 5)
I had the same error when I used:
plot_DK + scale_x_continuous(0.1, 5)
I know that ggplot2 and sjPlot are definitely compatible as I was able to recolour the plot despite being unable to change the x-axis.
How do I resolve this error?