- Operating System: Windows 10
- brms Version: 2.9.0
This might be more of a ggplot question. Not sure. I am creating a marginal effects plot for a 3-way interaction. The following code (below at end of post) will produce an example of the plot. However, for the pre-intervention period (period=1pre; left panel) I would like to constrain the x-axis to 1-10 and for the post-intervention period (right panel), constraint the x-axis from 10-20, in the 2-panel plot that is produced. As it is, the x-axis goes from 1-20 in both panels. I have tried a variety of things, including deleting the data rows that I don’t want out of the marginal effects object and then re-calling plot(me) - this constrains the data, but the x-axis is still 1-20 on both plots.
Is there any way to manually constrain the x-axis for this 2-panel marginal effects plot?
model.3way<-brm(outcome ~ treatmentperiodtime, data=data)
conditions <- make_conditions(model.3way, “period”)
me<-marginal_effects(model.3way, “time:treatment”, conditions = conditions)