Hi everyone, @martindemel
in JMP 18.0.1, I am launching a linear model :
Y ~ X1 * X2
Where :
- Y is the continuous response
- X1 is a continuous regressor
- X2 is a categorical regressor (3 categories named "A", "B", "C")
Some people call this model an ANCOVA
From this I get :
an intercept and a slope (over X1) per categories of X2., like in the following graphic:
I would like to compare these slopes against each other in a paire-wise manner.
like so (done in R 4.2.2
library(emmeans)
pairs(emtrends(lm(Y ~ X2 * X1, data = df), ~ X2, var="X1"))
contrast estimate SE df t.ratio p.value
A - B 0.211 0.0616 54 3.431 0.0033
A - C -1.721 0.0616 54 -27.934 <.0001
B - C -1.932 0.0616 54 -31.365 <.0001
P value adjustment: tukey method for comparing a family of 3 estimates
For now, in JMP I only found ways to do very close things but not exactly what I want :
1. Fit model appraoch: Compare Slopes with Overall Average
--> Red Triangle / estimates / Compare slopes
This compares each slope to the avergage slope (with a Nelson adjustment)
2. Fit curve approach: Equivalence Test Results
--> red triangle (from linear fit) / Equivalence test
This approach performs pairwise (accross categories of X2) equivalence tests for each parameters of the fit. here, there are only 2 paramters, the intercept and the slope.
Conclusion and final question :
I know there are multiple ways to decide whether one slope is different from the others. But I am looking for the specific approach of pairewise comparison between slopes (same as performable in R, see above).
Description of the attachements :
- data.xlsx = Excel file of the data (simulated data)
- Compare_slopes_example.jmp = JMP table, with the data from data.xlsx and the fit model, fit curve analyses saved to it.
I thank you very much for your help !
Have a nice day = )