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=~x, psi=c(245000))


The following line does *not* work (as specified in ?segmented, argument seg.Z)

myreg2 = lm(xy$y ~ xy$x)
mysegmented = segmented(myreg2, seg.Z=~xy$x, psi=c(245000)) #error


Hope to have been clear,
vito



Il 10/01/2012 17.17, Filoche ha scritto:
Hi everyone.

I'm trying to use the segmented function with the following data:


For instance, I use segmented package as follow:

myreg2 = lm(xy$y ~ xy$x)
mysegmented = segmented(myreg2, seg.Z=~x, psi=c(245000), control =
seg.control(display=FALSE))

Which get me to the following error :


As a break point, a starting guess of 245000 seems fair.

Anyone has an idea why I'm getting such error?

Regards,
Phil

--
View this message in context: 
http://r.789695.n4.nabble.com/Problem-with-segmented-tp4282398p4282398.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
====================================
Vito M.R. Muggeo
Dip.to Sc Statist e Matem `Vianelli'
Università di Palermo
viale delle Scienze, edificio 13
90128 Palermo - ITALY
tel: 091 23895240
fax: 091 485726
http://dssm.unipa.it/vmuggeo

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to