Description Usage Arguments Details Value Examples

Simulates a series under the given ARFIMA model by applying an MA filter to a series of innovations.

1 2 3 4 5 6 7 8 9 10 11 12 |

`n` |
Desired series length. |

`d` |
Fractional differencing parameter. |

`ar` |
Vector of autoregressive parameters. |

`ma` |
Vector of moving average parameters, following the same sign convention as |

`mu` |
Mean of process. By default, added after integer integration but before burn-in truncation (see |

`sig2` |
Innovation variance if innovations not provided. |

`stat.int` |
Controls integration for non-stationary values of |

`n.burn` |
Number of burn-in steps. If not given, chosen based off presence of long memory ( |

`innov` |
Series of innovations. Drawn from normal distribution if not given. |

`exact.innov` |
Whether to force the exact innovation series to be used. If |

The model is defined by values for the AR and MA parameters (*φ* and *θ*, respectively), along with the fractional differencing parameter *d*. When *d≥q 0.5*, then the integer part is taken as *m=\lfloor d+0.5\rfloor*, and the remainder (between -0.5 and 0.5) stored as *d*. For *m=0*, the model is:

*≤ft(1 - ∑_{i=1}^p φ_i B^i\right)≤ft(1 - B\right)^d (y_t - μ)=≤ft(1 + ∑_{i=1}^q θ_i B^i\right) ε_t*

where *B* is the backshift operator (*B y_t = y_{t-1}*) and *ε_t* is the innovation series. When *m > 0*, the model is defined by:

*y_t = (1 - B)^{-m}x_t*

*≤ft(1 - ∑_{i=1}^p φ_i B^i\right)(1 - B)^d (x_t - μ)=≤ft(1 + ∑_{i=1}^q θ_i B^i\right) ε_t*

When `stat.int = FALSE`

, the differencing filter applied to the innovations is not split into parts, and the series model follows the first equation regardless of the value of *d*. This means that *μ* is added to the series after filtering and before any truncation. When `stat.int = TRUE`

, *x_t - μ* is generated from filtered residuals, *μ* is added, and the result is cumulatively summed *m* times. For non-zero mean and *m>0*, this will yield a polynomial trend in the resulting data.

Note that the burn-in length may affect the distribution of the sample mean, variance, and autocovariance. Consider this when generating ensembles of simulated data

A numeric vector of length n.

1 2 3 4 5 6 | ```
## Generate ARFIMA(1,d,0) series with Gaussian innovations
x <- arfima.sim(1000, d=0.6, ar=c(-0.4))
## Generate ARFIMA(1,d,0) series with uniform innovations.
innov.series <- runif(1000, -1, 1)
x <- arfima.sim(1000, d=0.6, ar=c(-0.4), innov=innov.series, exact.innov=TRUE)
``` |

```
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.