Description Usage Arguments Examples
This function generates random vectors from the stationary Gaussian auto-regressive moving-average (GARMA) distribution. The user specifies
the number of vectors n
and their dimension m
and the function returns an n x m matrix of generated time-series from the GARMA
distribution with the specified parameters. By default the function generates from the marginal GARMA distribution, but the user may give
conditional values in the condvals
vector to generate from the associated conditional distribution (non-conditional values in this
vector are given as NA
).
1 2 3 4 5 6 7 8 9 |
n |
Positive integer giving the number of random vectors to generate |
m |
Positive integer giving the dimension of the random vectors to generate (i.e., the number of values in each time-series) |
condvals |
Either a single value |
mean |
The mean parameter |
errorvar |
The error variance parameter |
ar |
Vector of auto-regressive coefficients (all roots of AR characteristic polynomial must be outside the unit circle) |
ma |
Vector of moving-average coefficients |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #Set the model parameters
AR <- c(0.8, -0.2)
MA <- c(0.6, 0.3)
#Generate random time-series from the GARMA distribution
SERIES <- rGARMA(n = 16, m = 30, ar = AR, ma = MA)
#Set the conditional values
CONDVALS <- rep(NA, 30)
CONDVALS[1] <- -4
CONDVALS[12] <- 0
CONDVALS[30] <- 4
#Generate and plot random time-series from the GARMA distribution
SERIES.COND <- rGARMA(n = 16, m = 30, ar = AR, ma = MA, condvals = CONDVALS)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.