gen.signal {dSTEM}R Documentation

Generate simulated signals

Description

Generate simulated signals

Usage

gen.signal(l, h, jump, b1, rep = 1, shift = 0)

Arguments

l

length of data, if data is periodic then the length in each period

h

numerical vector of true change point locations

jump

numerical vector of jump size at change point locations

b1

numerical vector of piecewise slopes

rep

number of periods if data is periodic, default is 1

shift

numerical vector of vertical shifts for each period, default is 0

Value

a vector of simulated signal

Examples

l = 1200
h = seq(150,by=150,length.out=6)
jump = rep(0,7)
beta1 = c(2,-1,2.5,-3,-0.2,2.5)/50
beta1 = c(beta1,-sum(beta1*(c(h[1],diff(h))))/(l-tail(h,1)))
signal = gen.signal(l,h,jump,beta1)

[Package dSTEM version 2.0-1 Index]