rnormtz {SuperGauss} | R Documentation |
Simulate a stationary Gaussian time series.
Description
Simulate a stationary Gaussian time series.
Usage
rnormtz(n = 1, acf, Z, fft = TRUE, nkeep, tol = 1e-06)
Arguments
n |
Number of time series to generate. |
acf |
Length- |
Z |
Optional size |
fft |
Logical; whether or not to use the |
nkeep |
Length of time series. Defaults to |
tol |
Relative tolerance on negative eigenvalues. See Details. |
Details
The FFT method fails when the embedding circulant matrix is not positive definite. This is typically due to one of two things:
Roundoff error can make tiny eigenvalues appear negative. For this purpose, argument
tol
can be used to replace all negative eigenvalues bytol * ev_max
, whereev_max
is the largest eigenvalue.The autocorrelation is decaying too slowly on the given timescale. To mitigate this, argument
nkeep
can be used to supply a longeracf
than is required, and keep only the firstnkeep
time series observations. For consistency,nkeep
also applies to Durbin-Levinson method.
Value
Length-nkeep
vector or size nkeep x n
matrix with time series as columns.
Examples
N <- 10
acf <- exp(-(1:N - 1)/N)
rnormtz(n = 3, acf = acf)