dnormtz | R Documentation |
Density of a multivariate normal with Toeplitz variance matrix.
dnormtz(X, mu, acf, log = FALSE, method = c("gschur", "ltz"))
X |
Vector of length |
mu |
Vector or matrix of mean values of compatible dimensions with |
acf |
Vector of length |
log |
Logical; whether to return the multivariate normal density on the log scale. |
method |
Which calculation method to use. Choices are: |
Vector of n
(log-)densities, one for each column of X
.
# simulate data N <- 10 # length of each time series n <- 3 # number of time series theta <- 0.1 lambda <- 2 mu <- theta^2 * rep(1, N) acf <- exp(-lambda * (1:N - 1)) X <- rnormtz(n, acf = acf) + mu # evaluate log-density dnormtz(X, mu, acf, log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.