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
- /
- SAS Programming
- /
- SAS Procedures
- /
- piecewise regression

Topic Options

- 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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-23-2015 10:18 AM

Hello everyone,

I am new to SAS, although I have used Program R a little in the past. I need to run a piecewise regression/multi-phase regression for a data set that will have either two or three linear segments, and is continuous. I don't know which, but it will be one of the two. I believe I need to use PROC NLIN to accomplish this, but don't know how to set up the code for the two potential break points. I have attached a dummy data set. Could one of you be so kind as to help walk me through the code for this? I am interested in finding the break point or points, and the adj. r^2.

I appreciate your time,

Thank you,

Tim Muhich

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

Posted in reply to tmuhich

11-23-2015 01:27 PM

There have been several papers written on this topic. You will need one parameter for each location where you think the derivative is discontinuous. One easy-to-read paper is by Schwarz (2015). It is the similar to an example from the UCLA web site. They both include code for PROC NLIN, although the example only has a single "elbow" point where the PL curve changes slope.