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

2015-08-07 Thread David Winsemius
On Aug 7, 2015, at 12:05 PM, Drew Morrison wrote: > 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

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

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

2015-08-07 Thread Adams, Jean
This posting on StackOverflow might be useful to you. http://stackoverflow.com/questions/13810607/in-r-package-segmented-how-could-i-set-the-slope-of-one-of-lines-in-the-model Jean On Thu, Aug 6, 2015 at 3:01 PM, Drew Morrison wrote: > Hi, > > I'm working on a way to predict the electricity con

[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