UPDATE BELOW
I am running a logistic regression model in R, in which the DV has four categories, one of which, however, is the baseline. The baseline category represents the absence of the phenomenon I am predicting, whereas the other three categories represent three different types of that phenomenon. To do this I am using the nnet package (nnet::multinom). In the regression table I obtain, everything is perfect, the baseline is treated as the baseline and only the coefficients (and SEs, stars etc.) for the effects on the three non-baseline categories are shown, as they should. However, When trying to plot the marginal effects, using a number of different methods, such as the plot_cap function from the marginaleffects package, and the plot_model function from the sjPlot package, the marginal effects of all of the categories are plotted, including the baseline category, and those of non-baseline categories 1 and 2 are plotted in accordance with the regression results, but the third non-baseline category is represented as a flat line, whereas its coefficient is actually quite large in one case. I'm feeling that the function may have taken category 3 as the baseline, but I'm not 100% sure. If it is indeed the baseline that is the problem, how do I force the plotting functions to pick the baseline I want?
For the plots, I'm using the following codes:
plot_cap: plot_cap(model_2, condition = c("clientelism", "group"), type = "probs")
plot_model: plot_model(model_1, type = "pred", terms = c("distance_coalition_mean"))
As you can see below, I'm plotting the marginal effects of different IVs from 2 different models using different methods, and they all show up with a flat line for the third category. The coefficient for the effect of clientelism on the outcome being of category 3 in model 2 is 8.58, significant at the 0.01 level, and the effect of distance_coalition_mean on category 3 in model 1 is 0.341 (not significant).
marginal effects of clientelism, using plot_cap:
marginal effects of distance_coalition_mean, using plot_model:
I defined the baseline of the DV in the following way:
data$main_DV2 <- relevel(data$main_DV, ref = "0")
Out of this dataset, I then created two subsets, one to be used with model_1 (sample_1) and the other with model_2 (sample_2).
The model specifications are the following:
model_1 <- nnet::multinom(main_DV2 ~ seat_share_assembly + distance_coalition_mean + distance_opposition_mean + cabinet_seat_share + age_democracy + inflation + committees_per_portfolio + prestige1 + Benin + Brazil + Chile + Indonesia + Kenya + Malawi + Philippines + Uruguay, data = sample_1, trace = FALSE)
model_2 <- nnet::multinom(main_DV2 ~ seat_share_assembly + distance_coalition_mean + distance_opposition_mean + clientelism*local_org_strength + cabinet_seat_share + age_democracy + inflation + committees_per_portfolio + prestige1 + Benin + Brazil + Chile + Indonesia + Kenya + Malawi + Philippines + Uruguay, data = sample_2, trace = FALSE)
I'd greatly appreciate any help!
UPDATE
I obtained the predicted probabilities for both models using the predictions(model_x) functions from the marginaleffects package, which showed that the predicted probabilities for group 3 are significantly smaller than those for the other groups:
Model 1:
distribution predicted probabilities model 1
Model 2:
distribution predicted probabilities model 2
Hence, the flat line for group 3 seems to be a scale problem. My question then becomes how to change the scale for only the graph corresponding to group 3 in the second figure I posted, either using plot_model method described above or using
plot_cap(model_2, condition = "clientelism", type = "probs") + facet_wrap(~group)
which also generates 4 separate graphs rather than a single combined one. I haven't been able to find this in the documentation of neither the marginaleffects nor the sjPlot packages.