This function computes the probability density function from the stationary Gaussian auto-regressive moving-average (GARMA) distribution.
The user specifies a vector x
giving a single time-series vector, or a matrix x
giving one time-series vector in each row, and the
function returns the vector of cumulative probabilities corresponding to the input time-series vectors. By default the function generates from
the marginal GARMA distribution, but the user may give conditioning indicators in the cond
vector to compute the conditional density where
some of the elements in the input vectors are conditioning values.
dGARMA(
x,
cond = FALSE,
mean = 0,
errorvar = 1,
ar = numeric(0),
ma = numeric(0),
log = FALSE
)
A vector or matrix of time-series values (if a matrix, each time-series should be one row of the matrix)
Either a single logical value FALSE
or a logical vector with the same number of elements; as each time-series vector; each logical value indicates whether the density is conditional on the associated time-series value in x
.
The mean parameter
The error variance parameter
Vector of auto-regressive coefficients (all roots of AR characteristic polynomial must be outside the unit circle)
Vector of moving-average coefficients
Logical; if TRUE
the function returns the log-density; if FALSE
the function returns the density
# NOT RUN {
data(garma)
AR <- c(0.8, -0.2)
MA <- c(0.6, 0.3)
#Compute the density of the GARMA output
(DENSITY <- dGARMA(SERIES, ar = AR, ma = MA))
# }
Run the code above in your browser using DataLab