Choosing Wisely: Using the Appropriate Statistical Test for Trend in SAS

Christina Park1, Jui-Ting Hsiung1, Melissa Soohoo1, Elani Streja2
1University of California, Irvine, 2UC Irvine


Tests for trend are an informative and useful tool to examine whether means, medians or proportions of continuous or categorical variables increase or decrease across ordered groups. In clinical and epidemiological research, comparisons of baseline patient characteristics (e.g., demographic, clinical and laboratory data) across ordered levels of the categorized primary exposure are often examined with chi-square or analysis of variance (ANOVA) statistical tests. These latter tests identify the existence of differences in patient characteristics, yet provide little information on trends in the ordered groups. Trend tests provide additional insight into the pattern of the relationship between independent and dependent variables. Multiple methods are available in SAS to evaluate trends of continuous and categorical variables using PROC REG (simple linear regression) and PROC FREQ (Jonckheere-Terpstra, Cochran-Armitage and Cochran-Mantel-Haenszel tests) statements. However, choosing the appropriate statistical test can be a challenge. The choice of tests varies depending on the assumptions about the variable of interest including its type and distribution. Selecting an inappropriate test may lead to incorrect inferences about the trend of the variable across ordered exposure groups. This is important, especially when the results from trend tests may influence which variables are considered as covariates in models of adjustment. In this paper, we aim to (1) describe when to use specific statistical tests to evaluate trends in continuous or categorical variables across ordered groups, and (2) provide examples of SAS codes for trend tests and interpret the resulting output.