timeSeries-method-stats {timeSeries} | R Documentation |
S4 methods of stats package for timeSeries
objects.
cov | Computes Covariance from a 'timeSeries' object, |
cor | Computes Correlations from a 'timeSeries' object. |
dcauchy | ... |
dnorm | ... |
dt | ... |
## S4 method for signature 'timeSeries' cov(x, y = NULL, use = "all.obs", method = c("pearson", "kendall", "spearman")) ## S4 method for signature 'timeSeries' cor(x, y = NULL, use = "all.obs", method = c("pearson", "kendall", "spearman"))
method |
a character string indicating which correlation coefficient (or
covariance) is to be computed. One of |
use |
an optional character string giving a method for computing
covariances in the presence of missing values. This must
be (an abbreviation of) one of the strings |
x |
an univariate object of class |
y |
NULL (default) or a |
returns the covariance or correlation matrix.
## Load Microsoft Data Set - data(MSFT) X = MSFT[, 1:4] X = 100 * returns(X) ## Compute Covariance Matrix - cov(X[, "Open"], X[, "Close"]) cov(X)