Comparing beta coefficients from a GLMM I have a logistic mixed-effects model with multiple predictors:
y ~ (x1 + x2 + x3)*x4 + x5 + (x1 + x2 + x3 | id), family = "binomial"

I would like to know whether the interaction between, let's say, x1 and x4 (both continuous variables), is statistically significantly different from the interaction between x2 (also continuous) and x4. Is it possible to do so? What methods should I use?
Notes based on EdM's comment: x1 and x2 represent differences between two options based on a certain aspect of each option. To make this more concrete, let's say (as a toy example) that you are choosing between apples and oranges. y is whether you choose apples (0) or oranges (1). x1 could be the difference (oranges-apples) in calories between apples and oranges. x2 could be the difference in tastiness between oranges and apples. Your choice of what to eat will depend on both x1 and x2. However, the two may interact with x4 - let's say that x4 is time of the year. The later in the year, the stronger/weaker the effects of x1 and x2 may be. I want to know whether the interaction between x1 and x4 is different than that between x2 and x4. x1 and x2 are roughly on the scale, because they are both divided by their own standard deviation. However, the values are not exactly z-scored because the 0-value is meaningful, so I did not center them.
Thanks!
 A: If the predictors x1 and x2 are on the same scale, one approach would be to examine whether the interaction-coefficient estimates $\beta_{x_1 :x_4}$ and $\beta_{x_2 :x_4}$ can be distinguished statistically. The null hypothesis would be that $\beta_{x_1 :x_4}-\beta_{x_2 :x_4}=0$. A linear combination of variables that equals 0 is called a contrast in statistics.
To test that hypothesis you need to estimate the standard error of that difference. For that you need to use the formula for the variance of a weighted sum of correlated variables. In this case:
$$\text{Var}(\beta_{x_1 :x_4}-\beta_{x_2 :x_4})= \text{Var}(\beta_{x_1 :x_4}) + \text{Var}(\beta_{x_2 :x_4})-2\text{Cov}(\beta_{x_1 :x_4},\beta_{x_2 :x_4})$$
The variances and covariance on the right side of the equation are found in the coefficient variance-covariance matrix provided by the model. Take the square root of the result for the standard error, SE. With a generalized linear model the coefficient estimates have an asymptotic multivariate normal distribution, so you use a z-statistic $(\beta_{x_1 :x_4}-\beta_{x_2 :x_4})/\text{SE}$ to evaluate whether the difference in coefficients is statistically different from 0.
There are software tools that can make this easier and less error-prone, particularly for more complicated comparisons. This page illustrates the linearHypothesis() function of the R car package.
You should be very careful in the case of your model, however. The above will only evaluate the fixed-effect interactions, while you have random slopes involving those variables. It also assumes that x3 is constant. The usefulness of the comparison also depends on having both x1 and x2 on the same scale.
It might be more informative to illustrate predictions from the model under specific scenarios. See the help page for predict.merMod() in the lme4 package. If you are going to include random effects in your predictions, also see the bootMer() help page.
