KNOWLEDGEBASE - ARTICLE #1544

The post test for trend.

As part of one-way ANOVA, Prism (and InStat) offer the post test for linear trend.  This is very useful when the dataset columns are in a natural order --perhaps times or doses or ages. This test is also called trend analysis

The slope

The test for trend assumes that the X value (if there were one) for column B is one greater than the value for column A. And column C is much larger. The slope is the amount by which the mean value changes as you go from left to right from column to column. The slope is the change in Y per change in X. A change in X of one unit goes from one column to the next. So the slope is the average increase (decrese, if negative) as you move left to right from column to column. If you assigned a delta of 2 (rather than 1) as you move from column to column, the slope would be different but R2 and P value would be the same. So the slope is not a very useful value.

Prism uses the methods found on page 940-952 of Sheskin and 212-213 and 219-220 of Altman (references below). Here are the pages from Altman. It fits a straight line using linear regression on a data set it creates by using the column numbers as X (each column has an X value 1.0 greater than the previous one) and Y values computed from the column mean. Thus the method implicitly assumes that the ordered columns are equally spaced. It fits this line using only the means of each data set column, not accounting for sample size. If some columns have more values than others, those columns with more values do not get more weight in the analysis.  If there are data in four columns, the line is determined by fitting only four XY pairs.

Note an inconsistency in versions of Prism up to 6.07 and 6.0h. To compute a slope, you have to assign X values to the columns. With an odd number of columns, the X values are sequential (1, 2, 3). With an even number of columns, the X values were separated by 2  (2, 4, 6...). With Prism 7, we always assign X values sequentially (1,2,3..) so if you have an even number of columns, the slope in Prism 7 will be half that reported with Prism 6. Of course, the slope is an arbitrary value that depends on how you arbitrarily assign X values to the columns. Note that even if you enter values into the column titles, these are ignored for the test for trend. 

P value

Prism reports two P values.

Test for linear trend. The P value tests the null hypothesis that there is no linear trend between the population means and group order. It answers the question: If there really is no linear trend between column number and column mean, what is the chance that random sampling would result in a slope as far from zero (or further) than you obtained here? If the P value is small, conclude that there is a statistically significant linear trend. As you go from left to right in the data table, the column means tend to get higher (or lower).

Test for nonlinear trend. If you have four or more groups (data set columns), then Prism also reports a P value testing nonlinear trend. The null hypothesis is that the entire relationship between the column means and column order is linear. A small P value tells you there is also a nonlinear trend.

The P values are computed in a more complicated fashion, as explained in Sheskin and Altman. This calculation does take into account the total number of values and their variability. However the calculation of slope does not account for the actual variability. Therefore, the P value from the test for trend does not match the P value reported by the linear regression that generated the line.  

R2

Prism reports two different R2 values. The effect size R2  is the fraction of the total variance accounted for by the linear trend.This was the only R2 reported by Prism 6 which labeled it simply R2. The alerting R2 is the fraction of the variance between group means that is accounted for by the linear trend.  Because the variance between group means is always less than the total variance, the alerting R2 is always higher than the effect size R2

There are (at least) two ways to define R2 from the test for trend.  Prism uses the effect size method. This matches the results of linear regression, computed accounting for sample size. To get this R2 value, do linear regression with each individual value entered into the regression analysis (in contrast to the slope, which is computed by a regression analysis on only the mean values).

References 

Altman, D. G. 1991 Practical statistics for medical research.  Chapman and Hall

Sheskin, D. 2011 Handbook of Parametric and Nonparametric Statistical Procedures, Fifth Edition 5th Edition, Chapman and Hall/CRC

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.