Skip to content
Prev 476 / 20628 Next

nlmer: gradient for random change point model

On 13/12/2007, at 3:32 PM, Ken Beath wrote:

            
This is not correct, reason is that starting values for both slopes  
must be different, otherwise changing the breakpoint location doesn't  
change anything. It also helps to get the starting values close to the  
true values.
Following works fine

test.nls <- nls(dv ~ hockey(weeks, alpha1, beta1, beta2, brk),
						start= list(alpha1=30,beta1=-6,beta2=0,brk=5),
						trace=TRUE,
                        data = small.df)

Ken