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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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