BookmarkSubscribeRSS Feed
Barkamih
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

 

 

Thanks,

1 REPLY 1
StatsMan
SAS Super FREQ

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;
datalines;
TD 1.6
TN 2.4
;
run;

 

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;
run;

 

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');

run;

quit;

 

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 727 views
  • 1 like
  • 2 in conversation