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

I’m doing segmented regression.  I understand the theory behind it, but I can’t figure out which is the correct SAS model/output.  I found 2 different models in 2 books and they give slightly different results.  Any help is appreciated.

Example data:

Month    Mar    Apr    May    Jun    Jul (bp)    Aug    Sep    Oct    Nov

rate       55     51     48      49      150           156    165     172   180

X           1      2       3        4         5              6       7         8       9

X2        -4      -3     -2       -1         0              1       2         3       4

X3        -4      -3     -2       -1         0              0       0         0       0

X4         0       0       0       0         0              1       2         3       4

Which of these three models is correct?

Model 1: Proc reg; model rate = X   X4; run; (from Biostatistics for Animal Science)

Model 2: Proc reg; model rate = X2  X4;run;

Model 3: Proc reg; model rate = X3  X4;run; (from Draper and Smith, Applied reg analysis text book)

Model 2 output is the exact same at model 1 except the intercept parameters are more meaningful.

Model 3 is the same output as Model 2 except the slope after the break point (bp) is larger, and I don’t know why.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I would certainly expect models 1 and 2 to give the same output, as X2 is a centered version of X1.

The slope in Model 3 after the break is larger as it is the deviation from a plateau starting in July, as opposed to an additional increase over the linear trend modeled by X2.

Steve Denham

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

I would certainly expect models 1 and 2 to give the same output, as X2 is a centered version of X1.

The slope in Model 3 after the break is larger as it is the deviation from a plateau starting in July, as opposed to an additional increase over the linear trend modeled by X2.

Steve Denham

JennMills
Calcite | Level 5

Thanks, Steve.

Yes, I just figured out the slope after the break point reported by model 3 is the sum of the slope pre break point + the change in slope post break point.  I was not realizing models 1 and 2 were showing the change in slope rather than the new slope.

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