
Last chance! 50% off unlimited learning
Sale ends in
timeSeries
objects.
cov
Computes Covariance from a 'timeSeries' object,
cor
Computes Correlations from a 'timeSeries' object.
dcauchy
...
dnorm
...
dt
...
}## S3 method for class 'timeSeries':
cov(x, y = NULL, use = "all.obs",
method = c("pearson", "kendall", "spearman"))
## S3 method for class 'timeSeries':
cor(x, y = NULL, use = "all.obs",
method = c("pearson", "kendall", "spearman"))
"pearson"
(default),
"kendall"
, or "spearman"
, can be abbreviated."all.obs"
,
"complete.obs"
or "pairwise.complete.obs
timeSeries
.timeSeries
object with compatible
dimensions to x
. The default is equivalent to y = x (but
more efficient).## data -
x = as.timeSeries(data(msft.dat))[, 1:4]
x = 100*returns(x)
## cov -
cov(x[, "Open"], x[, "Close"])
cov(x)
Run the code above in your browser using DataLab