BookmarkSubscribeRSS Feed
jasu47
Calcite | Level 5

Using proc mixed I have created a two segment piecewise regression line with a known break-point. Is there a way to determine if the change in slope across the break-point, (the difference in slope between segment 1 and segment 2) is statistically significant?

3 REPLIES 3
PGStats
Opal | Level 21

We would have to see your model formulation to be more specific. But the idea is to include in your model a common slope for both segments and a difference in slope that applies to segment 2 only. That way, you automatically get the test for the significance of the difference in slopes. 

PG

PG
PGStats
Opal | Level 21

For a specialized tool addressing this problem (non SAS), take a look at Joinpoint from the National Cancer Institute :

Joinpoint Regression Program - Surveillance Research Program

PG

PG
PGStats
Opal | Level 21

If it can be of some inspiration, run the following simulation :


data have;
do x = 0 to 10 by 0.1;
     y = x + 0.7*max(0, x - 5) + rannor(1234);
     output;
     end;
run;

proc sgplot data=have;
scatter x=x y=y;
series x=x y=x;
run;

%let break_X=5;

data tmp;
set have;
xp = max(0, x - &break_X);
run;

proc reg data=tmp;
model y = x xp;
run;

The xp term in the model tests the difference in slopes.

PG

PG

sas-innovate-2024.png

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.

 

Register now!

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
  • 3 replies
  • 1742 views
  • 0 likes
  • 2 in conversation