| 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
tolcan be used to replace all negative eigenvalues bytol * ev_max, whereev_maxis the largest eigenvalue.The autocorrelation is decaying too slowly on the given timescale. To mitigate this, argument
nkeepcan be used to supply a longeracfthan is required, and keep only the firstnkeeptime series observations. For consistency,nkeepalso 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)