Re: [R] question about nlme...

2010-02-09 Thread Dieter Menne
Jeff Harring wrote: > > I am looking for R code to be able to fit a linear-linear piecewise > model with person-specific changepoint. I have searched the web, but > have not been able to locate any code. > > .. > I would appreciate any advice on this code or guidance as to where to > search

[R] question about nlme...

2010-02-09 Thread Jeff Harring
I am looking for R code to be able to fit a linear-linear piecewise model with person-specific changepoint. I have searched the web, but have not been able to locate any code. Below is my attempt at some code: chgpt = function(a1,a2,a3,gam,wave){ yht=numeric(10) y1=(wave <= gam)*(a1+(a2*wave))