Skip to content
Back to formatted view

Raw Message

Message-ID: <1344193778614-4639227.post@n4.nabble.com>
Date: 2012-08-05T19:09:38Z
From: stella
Subject: Problem with segmented function

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.