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.
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
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
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.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.