View source: R/covariance_plot.R
g_covariance | R Documentation |
Plot of covariance (or correlation) matrix as a function of lag or time. The covariance structure is vectorized internally and lag or time distances are computed and can be used for visualization.
g_covariance(
vcov_matrix,
time_prefix = NULL,
x_var = c("lag", "time_diff"),
xlab = NULL,
ylab = ""
)
vcov_matrix |
( |
time_prefix |
( |
x_var |
( |
xlab |
( |
ylab |
( |
The default time_prefix
value is NULL
, which assumes that the names
of the input matrix don't have any character string other than time point
value. If a time_prefix
is specified, this string should appear in front of
all the names in vcov_matrix
.
The ggplot
object.
vcov_matrix <- matrix(
c(49, 12, 12, 23),
nrow = 2, ncol = 2,
dimnames = list(
c(1, 2),
c(1, 2)
)
)
g_covariance(vcov_matrix, x_var = "time_diff")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.