timeSeries-method-stats

0th

Percentile

Time Series Correlations

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
...

Keywords
methods, chron
Usage
"cov"(x, y = NULL, use = "all.obs", method = c("pearson", "kendall", "spearman")) "cor"(x, y = NULL, use = "all.obs", method = c("pearson", "kendall", "spearman"))
Arguments
method
a character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman", can be abbreviated.
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 "all.obs", "complete.obs" or "pairwise.complete.obs".
x
an univariate object of class timeSeries.
y
NULL (default) or a timeSeries object with compatible dimensions to x. The default is equivalent to y = x (but more efficient).
Value

returns the covariance or correlation matrix.

Aliases
  • sd-methods
  • var-methods
  • cov-methods
  • cor-methods
  • dcauchy-methods
  • dnorm-methods
  • dt-methods
  • sd,timeSeries-method
  • var,timeSeries-method
  • cov,timeSeries-method
  • cor,timeSeries-method
  • dcauchy,timeSeries-method
  • dnorm,timeSeries-method
  • dt,timeSeries-method
Examples
library(timeSeries) ## Load Microsoft Data Set - data(MSFT) X = MSFT[, 1:4] X = 100 * returns(X) ## Compute Covariance Matrix - cov(X[, "Open"], X[, "Close"]) cov(X)
Documentation reproduced from package timeSeries, version 3022.101.2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.