Re: [R] predicting from segmented regression

2009-09-04 Thread Matthieu Dubois
dear Claudia, I was recently in touch with Vito Muggeo (the developer of the segmented package) with a similar question. This is an adapted version of his answer to your problem. In fact, the essential aspect is that predict.segmented has not (yet?) been implemented. Nevertheless, you could u

[R] predicting from segmented regression

2009-09-03 Thread claudia tebaldi
Hello I'm having trouble figuring out how to use the output of "segmented()" with a new set of predictor values. Using the example of the help file: set.seed(12) xx<-1:100 zz<-runif(100) yy<-2+1.5*pmax(xx-35,0)-1.5*pmax(xx-70,0)+15*pmax(zz-.5,0)+rnorm(100,0,2) dati<-data.fra