Re: [R] Piecewise (segmented) linear regression with center section slope constraint

2015-08-07 Thread Drew Morrison
Thanks, Jean. I've actually looked at that source before. The issue is that I can't constrain the slope of the /center/ section to be zero - in fact, I've applied similar code to a three-segment regression and I can get a zero slope either of the two sides, but not in the middle. Here's a list of

[R] Piecewise (segmented) linear regression with center section slope constraint

2015-08-06 Thread Drew Morrison
Hi, I'm working on a way to predict the electricity consumption of electrically heated buildings as a function of outdoor air temperature. I've identified a three-segment linear model as a candidate for a good fit, with the slope of the center section constrained to zero. I'm working with the segm