[R] Estimating and predicting using segmented Package

2013-12-20 Thread Melwin
I don't know if this is still relevant for you, but probably for someone else. I ran into the same problem an found two dirty workarounds that can help in many cases (but not all). Both can also be combined: 1. repeat the call to segmented with different seeds and different initial

[R] Estimating and predicting using segmented Package

2012-08-21 Thread Yunkai Huang
Hello, Any one who can help me with the problems regrarding segmented regression. 1.When I run the code as following: library(segmented) n -100 S-200 x1 - seq(-0.99,0.99,length=29) MSEPtrm-matrix(0,S,1) MAEtrm-matrix(0,S,1) TRM-matrix(0,S,length(x1)) for (s in seq(1:S)){ set.seed(123*s+123)