Suppose I have a dataset including 2 dependent variables( "x" and "z") and a response variable "y". the factor "x" has three levels: say 1, 2, and 3; the factor "z" has two levels, say "A" and "B". For a linear model (y ~ x, z, data=data), how can i then get the contrast between (B3-B1) and (A3-A1) ? or is there any way to do that?
Here is an example data for illustration.
Load the emmeans package
Load the built-in "warpbreaks" dataset