BookmarkSubscribeRSS Feed
_MooMoo
Obsidian | Level 7

Hello!

 

I fitted piecewise linear regression. The model specification is as follows...

_MooMoo_4-1602365044316.png,where _MooMoo_6-1602365044322.png

Intervention was being in effect right after block 24. Through this model, my ultimate goal is to check whether the rate has changed from pre-intervention to post-intervention. The reason why I chose piecewise model is because I also wanted to check how rate change overtime before and after intervention.

 

To check the ultimate goal, I ran following code...

proc glm data=X;

   class intervention;

   model rate=intervention block spline;

   lsmeans intervention/cl;

run;

 

However, LSMEANS statement wouldn't give me the answer I want. Actually, LSMEANS statement would give me pre-intervention and post-intervention rate when block variable and spline variable were set to its mean value. This is not what I wanted.

 

Does anyone has an idea how to output the mean rate of pre-intervention and mean rate of post-intervention from the model? 

 

Thank in advance!

1 REPLY 1
SteveDenham
Jade | Level 19

Question 1: What is 'spline' doing here?

Question 2: Isn't 'intervention' completely confounded with Block (i.e., Intervention=pre when Block<24, intervention=post when Block >=24?

 

Perhaps you could fit the segmented model without 'intervention' in the model.  Then when you get to the GLM phase, use an ESTIMATE or LSMESTIMATE to get the marginal means for intervention pre and intervention post.  I still don't know how to get around the spline issue - perhaps an AT option could be used in the LSMESTIMATE statement.

 

SteveDenham

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 379 views
  • 0 likes
  • 2 in conversation