BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
zta3
Calcite | Level 5

Hi group, 

I have a clinical dataset with about 80 patients. They had a baseline score (pre-intervention score) and a post intervention score. I used paired t test to compare the mean difference. 

Now I need to get parameter estimate (coefficient) of the post score  in a linear model and possibly add multiple covariates in later.  To my knowledge,  I can't really use ANCOVA, because it requires post-score as the dependent variable, and pre-score as the predictor. I also thought of using the difference of pre-/post- score as the outcome, but i'm not sure what the predictor would be in that model. 

I'm planning on using proc glm. So the code will be something like:

"proc glm data=have;

model difference= ? /clparam;"

So in short, I want to test the effect of intervention in score.

Thanks for any tips and helps! 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

It sounds like your response variable is the (post-pre) difference. If Diff is that difference, then you can include covariates (age, sex, ....) in GLM like this:

proc glm data=Have;
class Sex;
model Diff = Age Sex / solution;
quit;

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Now I need to get parameter estimate (coefficient) of the post score  in a linear model

 

What linear model are you thinking about? What is the independent (or predictor) variable? What is the response variable?

 

We can't really tell you what the model is, it's your problem and your data, you have to tell us what the model is.

--
Paige Miller
zta3
Calcite | Level 5

The main predictor would be the use of the intervention. So instead of using a paired t test, I'd like to see the effect in the linear model if it's possible.  

So I'm thinking

proc glm data=have;

model diff=/solution; 

run;

Is it just basically a one sample ttest? 

Rick_SAS
SAS Super FREQ

Correct. If all you want to know is whether there is a significant difference in the means between the pre- and post-intervention scores, then you can use a one-sample t test on the paired differences.  The t test assumes that the population of difference is normally distributed. If you don't believe that assumption, you can use the nonparametric Wilcoxon signed rank test.  Both of these can be run in SAS by using PROC UNIVARIATE on the (post-pre) differences. See the first section of the article

https://blogs.sas.com/content/iml/2023/07/19/wilcoxon-signed-rank.html

 

zta3
Calcite | Level 5
Thank you so much!
Rick_SAS
SAS Super FREQ

It sounds like your response variable is the (post-pre) difference. If Diff is that difference, then you can include covariates (age, sex, ....) in GLM like this:

proc glm data=Have;
class Sex;
model Diff = Age Sex / solution;
quit;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 1486 views
  • 3 likes
  • 4 in conversation