Help using Base SAS procedures

Two Sample Paired T Test

Reply
New Contributor
Posts: 3

Two Sample Paired T Test

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

 

Frequent Contributor
Posts: 103

Re: Two Sample Paired T Test

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

 

So, what code have your written so far?

Norman.
SAS 9.4 (TS1M4) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

Super User
Posts: 23,663

Re: Two Sample Paired T Test

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

 


 

New Contributor
Posts: 3

Re: Two Sample Paired T Test

[ Edited ]

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

Super User
Posts: 23,663

Re: Two Sample Paired T Test

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



New Contributor
Posts: 3

Re: Two Sample Paired T Test

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
Super User
Posts: 23,663

Re: Two Sample Paired T Test


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;
Ask a Question
Discussion stats
  • 6 replies
  • 125 views
  • 0 likes
  • 3 in conversation