BookmarkSubscribeRSS Feed
LorcanOB
Fluorite | Level 6

Using SAS 9.4

 

My research:

I had a group take a test (Baseline)

This group were then given two different drugs

The group then took the test again (FollowUp 1 [for drug 1] and FollowUp 2 [for drug 2])

I want to compare:

(Baseline to FollowUp1) = X

(Baseline to FollowUp2) = Y

Then compare X and Y to see if there was any difference in baseline to followup score changes relating to drug type

 

6 REPLIES 6
Norman21
Lapis Lazuli | Level 10

Of course, you planned your analysis when you designed the experiment.

 

So, what code have your written so far?

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

Reeza
Super User

Sounds exactly like this example here:

 

http://documentation.sas.com/?docsetId=statug&docsetTarget=statug_ttest_examples03.htm&docsetVersion...

 

Note that the code is included in the example so you can run the example. 

If you're just getting into SAS the first statistics course is free on the e-learning page.

 


@LorcanOB wrote:

Using SAS 9.4

 

My research:

I had a group take a test (Baseline)

This group were then given two different drugs

The group then took the test again (FollowUp 1 [for drug 1] and FollowUp 2 [for drug 2])

I want to compare:

(Baseline to FollowUp1) = X

(Baseline to FollowUp2) = Y

Then compare X and Y to see if there was any difference in baseline to followup score changes relating to drug type

 


 

LorcanOB
Fluorite | Level 6

Thanks Reeza. I am new (was it that obvious?)

I checked that out before, but I am wondering is there a way to do a comparison of changes within two groups then compare the results of those two comparisons?

 

I have attached sample data

Capture.PNG

Reeza
Super User

Post your data as text please.

 


@LorcanOB wrote:

Thanks Reeza. I am new (was it that obvious?)

I checked that out before, but I am wondering is there a way to do a comparison of changes within two groups then compare the results of those two comparisons?

 

I have attached sample data

Capture.PNG



LorcanOB
Fluorite | Level 6
0 4 8
0 9 9
0 17 17
0 2 0
0 6 11
0 6 6
0 21 21
0 10 5
0 12 9
0 10 11
1 3 2
1 16 13
1 18 14
1 11 12
1 4 3
1 10 7
1 7 13
1 9 11
1 2 6
1 21 21
1 8 8
1 1 8
1 5 6
1 13 8
Reeza
Super User

data have;
input group pre post;
diff = post-pre;
cards;
0 4 8
0 9 9
0 17 17
0 2 0
0 6 11
0 6 6
0 21 21
0 10 5
0 12 9
0 10 11
1 3 2
1 16 13
1 18 14
1 11 12
1 4 3
1 10 7
1 7 13
1 9 11
1 2 6
1 21 21
1 8 8
1 1 8
1 5 6
1 13 8
;
run;

proc anova data=have;
class group;
model diff = group;
means group / tukey;
quit;

SAS Innovate 2025: Register Today!

 

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1852 views
  • 0 likes
  • 3 in conversation