predict.dpseg: Predict method for 'dpseg' segmentations

Description Usage Arguments Value Examples

View source: R/dpseg.R

Description

Predicted values based on a data segmentation model from dpseg.

Usage

1
2
## 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

1
2
3
4
5
6
7
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)

Example output

calculating recursion for 229 datapoints

dpseg documentation built on Aug. 17, 2020, 5:06 p.m.