Programming the statistical procedures from SAS

Paired T-test For Data Set Where Patient ID listed twice

Reply
Occasional Learner
Posts: 1

Paired T-test For Data Set Where Patient ID listed twice

I want to do a paired t-test, but our data does not have pre and post variables. Instead, there is a type vairable where 1=initial screen, 2=rescreen, and 3=post health coaching. So essentially the patient ID will match and the variables I am interested in veggie consumption, fruit consumption, physcial activity in minutes, etc will be different for the participants at their initial and post screen. It would look something like this:

 

Patient ID     Type     Veggie   Fruit

1                      1            1          2

1                      3             3         4

2                      1             1         2

2                      2             2         2

 

We are interested in comparing two things: The participants scores at their post health coaching screens to their scores at initial screens and the participants rescreen scores to their initial screens scores.

 

Is there an easy way to do this?

 

I have only ever done paired t when their is a post and pre variable. 

 

PROC Star
Posts: 7,416

Re: Paired T-test For Data Set Where Patient ID listed twice

You need a repeated measure Anova (e.g., PROC GLM). A nice example and description can be found at:

http://www.ats.ucla.edu/stat/sas/library/repeated_ut.htm

 

HTH,

Art, CEO, AnalystFinder.com

 

Occasional Contributor
Posts: 6

Re: Paired T-test For Data Set Where Patient ID listed twice

An additional idea, could be to create a pre and post variable by creating 3 subsets, renaming the variables (Ex. Pre Veg) in those subsets then performing a merge by patient ID for the subsets that you want to compare in your paired ttest.

 

For Ex:

Subset 1 (Initital Scores) would include variable names PatientID, Veggie, Fruit where Type =1

Subset 2 (Rescreen) would include PatientID, Veggie, Fruit where Type =2

Subset 3 (Post health coaching) would include PatientID, Veggie, Fruit where Type = 3

 

Hope this makes sense,

Shavonne

 

 

Ask a Question
Discussion stats
  • 2 replies
  • 124 views
  • 2 likes
  • 3 in conversation