| Statistics Toolbox | ![]() |
Multiple Comparisons. We can perform a multiple comparison test by using the stats output from aoctool as input to the multcompare function. The multcompare function can test either slopes, intercepts, or population marginal means (the heights of the four lines evaluated at the mean X value). In this example, we have already determined that the slopes are not all the same, but could it be that two are the same and only the other one is different? We can test that hypothesis.
multcompare(stats,0.05,'on','','s')ans =1.0000 2.0000 -0.0012 0.0008 0.00291.0000 3.0000 0.0013 0.0051 0.00882.0000 3.0000 0.0005 0.0042 0.0079
This matrix shows that the estimated difference between the intercepts of groups 1 and 2 (1970 and 1976) is 0.0008, and a confidence interval for the difference is [-0.0012, 0.0029]. There is no significant difference between the two. There are significant differences, however, between the intercept for 1982 and each of the other two. The graph shows the same information.
Note that the stats structure was created in the initial call to the aoctool function, so it is based on the initial model fit (typically a separate-lines model). If you change the model interactively and want to base your multiple comparisons on the new model, you need to run aoctool again to get another stats structure, this time specifying your new model as the initial model.
| Confidence Bounds | The randtool Demo | ![]() |