[R] Problem with segmented function

stella dorotheabusse at yahoo.de
Sun Aug 5 21:09:38 CEST 2012


Hi,

I appreciate your help with the segmented function. I am relatively new to
R. I followed the introduction of the 'segmented'-package by Vito Muggeo,
but still it does not work.
Here are the lines I wrote:

data_test<-data.frame(x=c(1:10),y=c(1,1,1,1,1,2,3,4,5,6))
lr_test<-lm(y~x,data_test)
seg_test<-segmented(lr_test,seg.Z~x,psi=1)


/error in segmented.lm(lr_test, seg.Z ~ x, psi = 1) : 
 A wrong number of terms in `seg.Z' or `psi'/

Thank you very much,
Stella



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



More information about the R-help mailing list