predict.dpseg {dpseg} | R Documentation |
Predicted values based on a data segmentation model from
dpseg
.
## S3 method for class 'dpseg'
predict(object, xout, ...)
object |
result object returned by function
|
xout |
new x-values at which to predict |
... |
not used |
Returns predicted linear segments as x,y coordinates
(grDevices::xy.coords
) at xout
.
x <- oddata$Time
y <- log(oddata$A5)
segs <- dpseg(x=x, y=y, P=0.0001)
## predict method
plot(x=x, y=y, pch=19, cex=0.5)
lines(predict(segs), col=2, lwd=2)