sim.pw.arma: Simulation of a piecewise constant ARMA(p,q) model for p=2...

Description Usage Arguments Value Examples

View source: R/sim.pw.arma.R

Description

The function simulates a piecewise constant ARMA model with multiple change-points

Usage

1
sim.pw.arma(N, sd_u, b.slope, b.slope2, mac, br.loc)

Arguments

N

Length of the series

sd_u

A vector of the innovation standard deviation for every segment

b.slope

A vector of the AR(1) coefficients

b.slope2

A vector of the AR(2) coefficients

mac

A vector of the MA(1) coefficients

br.loc

A vector with the location of the change-points

Value

A simulated series

Examples

1
2
3
4
5
6
 
cps=c(125,532,704)
y=sim.pw.arma(N = 1024,sd_u = 1,b.slope=c(0.7,0.3,0.9,0.1),
b.slope2 = c(0,0,0,0), mac = c(0.6,0.3,0,-0.5),br.loc = cps)[[2]]
ts.plot(y)
abline(v=cps,col="red")                    

wbsts documentation built on July 1, 2020, 5:23 p.m.