pb_sim {memochange} | R Documentation |
Simulates persistence-break process
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
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, |
trend |
whether the time series exhibits a trend, |
tp |
trend parameter, |
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 |
var |
variance of the innovations. Default is |
Value
Returns a vector containing the simulated time series.
Author(s)
Janis Becker
Examples
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)