BookmarkSubscribeRSS Feed
SeaMoon_168
Quartz | Level 8

The data have time, censor, and a categorical variable bleed (low, medium, high). I was asked to conduct a trend test for the bleed variable by adding

contrast 'linear' bleed -1 0 1;

after the model statement.

However, if the bleed has four categories, (low, medium, high, severe), the the contrast should be

contrast 'linear' bleed -3 -1 1 3 ;

Can anyone help me figure out why the values of the contrast have to be -2 1 1 2 instead or other values?

 

 

 

 

3 REPLIES 3
SeaMoon_168
Quartz | Level 8

Thank you for your help. But I am still confused about how these values are created, for example, linear (-3 -1 1 3) and quadratic(1 -1 -1 1)?

  contrast 'linear'    dose -3 -1  1 3;
  contrast 'quadratic' dose  1 -1 -1 1;
  contrast 'cubic'     dose -1  3 -3 1;

 

Ksharp
Super User
I think here CONSTRAST test the hypothesis:
H0: -3*does1 + -1*does2 + 1*does3 + 3*does4 =0
Once H0 is true, does1<does2<does3<does4

Here could have you some clue:
https://communities.sas.com/t5/Statistical-Procedures/Test-for-trend-using-median-values/m-p/306764

or calling @StatDave @SteveDenham @lvm @jiltao

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1046 views
  • 0 likes
  • 2 in conversation