predict.dpseg {dpseg}R Documentation

Predict method for 'dpseg' segmentations

Description

Predicted values based on a data segmentation model from dpseg.

Usage

## S3 method for class 'dpseg'
predict(object, xout, ...)

Arguments

object

result object returned by function dpseg

xout

new x-values at which to predict \hat{y}

...

not used

Value

Returns predicted linear segments as x,y coordinates (grDevices::xy.coords) at xout.

Examples

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)

[Package dpseg version 0.1.1 Index]