pb_sim: Simulates persistence-break process

Description Usage Arguments Value Author(s) Examples

View source: R/pb_sim.R

Description

This function simulates a fractional white noise process that exhibits a break in persistence using FI.sim from the LongMemoryTS package. In the first part of the series the noise is integrated with order d_1 and in the second part with order d_2.

Usage

1
2
pb_sim(T, tau, trend = c("none", "linear"), tp = 0, d1, d2, mean = 0,
  var = 1)

Arguments

T

length of the time series.

tau

break fraction, T*tau yields the break point. It needs to hold that 0<tau<1.

trend

whether the time series exhibits a trend, "none" implies no trend and "linear" implies a linear trend.

tp

trend parameter, t*tp yields the contribution of the trend component if trend="linear".

d1

order of integration of the first part of the series.

d2

order of integration of the second part of the series.

mean

mean of the series. Default is mean=0.

var

variance of the innovations. Default is var=1

Value

Returns a vector containing the simulated time series.

Author(s)

Janis Becker

Examples

1
2
3
4
5
6
7
set.seed(410)

# generate persistence-break time series
series <- pb_sim(500, 0.5, "none", d1=0.2, d2=0.8, mean=0, var=1)

# plot generated series
stats::ts.plot(series)

memochange documentation built on July 27, 2020, 1:09 a.m.