Re: [R] Problem with segmented

2012-01-11 Thread Sarah Goslee
We really need the small reproducible example requested in the posting guide, including sample data, the actual R commands you used, the libraries required, and your OS and version of R. Sarah On Wed, Jan 11, 2012 at 9:08 AM, Filoche wrote: > Hi there. > > Here's the error message. > > Error in

Re: [R] Problem with segmented

2012-01-11 Thread Filoche
Hi there. Here's the error message. Error in seg.lm.fit(y, XREG, Z, PSI, weights, offs, opz) : (Some) estimated psi out of its range I have tried many ways to specify the arguments, but apparently the error message is related to the estimated break point being invalid. However, my estimation

Re: [R] Problem with segmented

2012-01-11 Thread Vito Muggeo (UniPa)
dear Phil, I am not able to read the error message.. did you forget it? However: does x exist in the workspace? The following lines work: myreg2 = lm(y ~ x, data=xy) mysegmented = segmented(myreg2, seg.Z=~x, psi=c(245000)) myreg2 = lm(xy$y ~ xy$x) x<-xy$x mysegmented = segmented(myreg2, seg.Z=