model_signal: Calculates the fitted values of the segmentation model

Description Usage Arguments Value Examples

View source: R/model_signal.R

Description

Calculates the fitted values of the segmentation model

Usage

1
model_signal(x, seg)

Arguments

x

a series of quantitative values

seg

a series of segment identifiers

Value

a series where fitted values correspond to mean per segment

Examples

1
2
3
4
x=c(rnorm(100,3,2),rnorm(100,10,2),rnorm(100,2,2),rnorm(100,-4,2),rnorm(100,6,2),rnorm(100,2,2),rnorm(100,8,2))
y=model_signal(x,seg=c(1,300,701))
plot(x)
lines(y, col="red")

lvaudor/hubr documentation built on Dec. 7, 2018, 8 a.m.