BookmarkSubscribeRSS Feed
Pyrite | Level 9

Dear All,

I have clinical trial data, where I have control and treatment variables. The treatment variables have three readings for each.

How can I conduct this analysis and how to import this data properly.

Example of my data: TD is control. TN and PW are treatments.


I want to test TD against TN and  PW:



                TD                            TN                           PW

24H     20.3   21.2   20.6        30.1  31      32         40  40.1 42

48H     19.5    20      21          18   18.1   18.3        40  41   42





You can use a DATA Step to read in your data.  With the small amount of data, using a DATA Step will be the quickest way to get your data into a SAS data set.  Try something like


data test;
input trt $ y;
TD 1.6
TN 2.4


You will need 1 line for each observation, so just keep adding lines below the datalines; command and above the semicolon and run; lines.  Once you have the data typed in, submit that code and then


proc print data=test;


to make sure the data is in the data set correctly.


Once your data is in a SAS data set, you can use PROC GLM to analyze your experiment.  Something like


proc glm data=test;

class trt;

model y=trt;

lsmeans trt / adjust=dunnett pdiff=control('TD');




should do it.  The LSMEANS statement says to compare each of the treatment levels of the variable TRT to the control level (as specified through the PDIFF= sub-option).  


You can find documentation on PROC GLM here:

GLM Documentation

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1 like
  • 2 in conversation