Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- Orthogonal contrast and treatment order

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 11-27-2022 04:02 PM
(998 views)

Hello

I need to compare my “control” group with all other groups that received a dietary supplement with three different ratios. Now I want to compare my control group with the other three groups using the Orthogonal contrast in SAS.

I have a confusion about the “Treatment order”. Can someone help me confirm whether my treatment order is correct or not? If not, what will be the correct “Treatment order” in the below proc statement to compare the control group with all other groups?

```
FILENAME REFFILE '/home/u58890255/ukhan.xlsx';
PROC IMPORT DATAFILE=REFFILE
DBMS=XLSX
OUT=WORK.IMPORT;
GETNAMES=YES;
RUN;
proc glm data=WORK.IMPORT;
class Treatment_code;
model Glucose=Treatment_code;
contrast 'linear' Treatment_code -3 1 1 1;
contrast 'quadratic' Treatment_code -3 1 1 1;
contrast 'cubic' Treatment_code -3 1 1 1;
contrast 'quartic' Treatment_code -3 1 1 1;
title 'Orthogonal and Non-orthogonal Polynomial Constrasts';
run;
ods rtf close;
run;
```

Thank you so much for your help.

Kind regards,

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Now I want to compare my control group with the other three groups using the Orthogonal contrast in SAS.

Comparing treatment to control is simple. I don't understand where orthogonal contrasts fit here, it seems to me that these are not needed. You can use the MEANS statement with the DUNNETT option to obtain statistical test of whether or not the mean of the control group is different than the means of the other group(s).

If you want to compare the mean of the control group to the combined means of all the other groups, then you need a contrast statement.

`contrast 'Control Vs Mean of Other Groups' Treatment_code -3 1 1 1;`

which assumes taht the first group is the control and the other three groups are the treatments.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks for the comments and correction. Could you please check the attached screenshot to this reply where the authors used three different contrast tests to compare Control group with other treatments. The same I want to do for my data. Many thanks once again

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

So, although I know in general what orthogonal contrasts are, I have to say that I don't know what the "C vs R Orthogonal Contrasts" means in the context of your experiment, where you have categorical treatments and you are comparing them to control treatment. It is possible to have orthogonal linear, quadratic, cubic, ... contrasts and test them all at once, but since I haven't read whatever paper this is, I am not willing to jump to the conclusion that the author means orthogonal linear, quadratic, cubic ... contrasts, and its not clear to me how to compare to controls using orthogonal contrasts.

And by the way, what do you mean by orthogonal contrasts for the values of Treatment_Code for the problem of comparing the treatments to control? Please explain without SAS code. And, what are the values of Treatment_Code?

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

C vs R Orthogonal Contrasts: Here, the** “C”** stands for the control group, while **R** stands for four treatments (viz., 0.4, 0.7, 1, and 3) that had __rosemary as a dietary supplement__. The authors try to check the effects of rosemary on fish growth when given to fish at different concentrations.

**Treatment_Code:** These are the numbers that I assigned to each group, e.g., for the control group, I assigned 1; for 1%PSE treatment I assigned 2; for 3%PSE treatment I assigned 3; and for 4%PSE treatment I assigned 4.

I need some hints on how to run the orthogonal linear, quadratic, cubic, ... contrasts on my data to compare control with other treatments.

Kind regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I need to analysis my data with the polynomial contrasts (linear and quadratic) and orthogonal contrast between control and treatment groups

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Treatment_Code:These are the numbers that I assigned to each group, e.g., for the control group, I assigned 1; for 1%PSE treatment I assigned 2; for 3%PSE treatment I assigned 3; and for 4%PSE treatment I assigned 4.

It's unclear what this means. In one place you state the treatment levels are 0.4, 0.7, 1, and 3 and then the above sentence doesn't match, and doesn't seem to serve any valid statistical purpose. Why not just use numerics 0.4, 0.7, 1 and 3 to obtain your analysis?

You could fit a comparison of control vs the treatment by putting treatment into a CLASS variable as you have done. This isn't orthogonal contrasts and it isn't linear, quadratic or cubic, but it is meaningful in this case.

I need some hints on how to run the orthogonal linear, quadratic, cubic, ... contrasts on my data to compare control with other treatments.

Yes, I know that, you said that before, and repeating information without providing new information doesn't get us anywhere. I still don't understand linear, quadratic and cubic and orthogonal contrasts with respect to comparing control to treatment, I asked you to explain what that means in the context of your experiment, and you didn't explain what that means.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

*0.4, 0.7, 1, and 3 belong to the published paper which I follow for my study. 0.4, 0.7, 1, and 3 are actually treatments 1, 2, and 3. This paper is just a guideline for me, and has nothing with my data.***About my data, I have revised my Excel file and want to run the polynomial contrasts (linear and quadratic) as well as the orthogonal contrast between the Control vs. other groups given in column B in Excel file. Please check the newly attached Excel file to this post.**

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.