turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Which proc reg statement is correct when doing seg...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-20-2014 10:52 AM

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.

Accepted Solutions

Solution

11-20-2014
02:34 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-20-2014 02:34 PM

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

All Replies

Solution

11-20-2014
02:34 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-20-2014 02:34 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-20-2014 03:51 PM

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.