ccov.mcgf {mcgf} | R Documentation |
Covariance/correlation for joint distribution of an mcgf
object
Description
Covariance/correlation for joint distribution of an mcgf
object
Usage
## S3 method for class 'mcgf'
ccov(x, model = c("all", "base", "empirical"), cor = FALSE, ...)
Arguments
x |
An |
model |
Which model to use. One of |
cor |
Logical; if TRUE, correlation is outputted. |
... |
Additional arguments. Not in use. |
Value
Joint covariance/correlation matrix.
Examples
data(sim1)
sim1_mcgf <- mcgf(sim1$data, dists = sim1$dists)
sim1_mcgf <- add_acfs(sim1_mcgf, lag_max = 5)
sim1_mcgf <- add_ccfs(sim1_mcgf, lag_max = 5)
# Fit a separable model and store it to 'sim1_mcgf'
fit_sep <- fit_base(
sim1_mcgf,
model = "sep",
lag = 5,
par_init = c(
c = 0.001,
gamma = 0.5,
a = 0.3,
alpha = 0.5
),
par_fixed = c(nugget = 0)
)
sim1_mcgf <- add_base(sim1_mcgf, fit_base = fit_sep)
ccov(sim1_mcgf, model = "base")
[Package mcgf version 1.1.1 Index]