I'm trying to create a segmented regression which is quadratic in both segments, with the location of the breakpoint as one of the optimizing variables. I don't want to impose the condition that the overall regression be continuous, which seems to be complicating my attempts at implementation. Below is my current attempt in optmodel. The value for "break" that is returned is zero, so it seems like the break variable is somehow being ignored, even though the log acknowledges that there are seven variables in this optimization problem. When I substitute a specific numerical value for break, the optimization seems to work, so it seems like I am able to compute a segmented quadratic regression with a pre-specified breakpoint, but I can't seem to make the breakpoint one of the optimizing variables.
I have moved your question / topic to the appropriate board (mathematical optimization).
You can also consider PROC NLIN :
or PROC ADAPTIVEREG :
Koen
Thank you for the reply! I tried the PROC nlin approach from the first blog post previously, but I wasn't able to find a way to adapt it, since it seemed like that method relied on the fact that continuity/smoothness meant that the breakpoint could be defined as a function of parameters. I'm struggling to find a way for the breakpoint to be a completely free variable.
Can you please share your data set?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.