rnormtz | R Documentation |
Simulate a stationary Gaussian time series.
rnormtz(n = 1, acf, Z, fft = TRUE, nkeep, tol = 1e-06)
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. |
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 by tol * ev_max
, where ev_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 longer acf
than is required, and keep only the first nkeep
time series observations. For consistency, nkeep
also applies to Durbin-Levinson method.
Length-nkeep
vector or size nkeep x n
matrix with time series as columns.
N <- 10 acf <- exp(-(1:N - 1)/N) rnormtz(n = 3, acf = acf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.